rutabaga_gfx/rutabaga_os/sys/stub/
shm.rs1use std::ffi::CStr;
6
7use crate::rutabaga_os::descriptor::AsRawDescriptor;
8use crate::rutabaga_os::descriptor::IntoRawDescriptor;
9use crate::rutabaga_os::RawDescriptor;
10use crate::rutabaga_utils::RutabagaError;
11use crate::rutabaga_utils::RutabagaResult;
12
13pub struct SharedMemory {
14 size: u64,
15}
16
17impl SharedMemory {
18 pub fn new(_debug_name: &CStr, _size: u64) -> RutabagaResult<SharedMemory> {
20 Err(RutabagaError::Unsupported)
21 }
22
23 pub fn size(&self) -> u64 {
28 self.size
29 }
30}
31
32impl AsRawDescriptor for SharedMemory {
33 fn as_raw_descriptor(&self) -> RawDescriptor {
34 unimplemented!()
35 }
36}
37
38impl IntoRawDescriptor for SharedMemory {
39 fn into_raw_descriptor(self) -> RawDescriptor {
40 unimplemented!()
41 }
42}
43
44pub fn round_up_to_page_size(_v: u64) -> RutabagaResult<u64> {
46 Err(RutabagaError::Unsupported)
47}