File: shared-memory.hpp

package info (click to toggle)
higan 106-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 9,640 kB
  • sloc: cpp: 108,736; ansic: 809; makefile: 22; sh: 7
file content (27 lines) | stat: -rw-r--r-- 730 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once

namespace nall {

struct shared_memory {
  shared_memory() = default;
  shared_memory(const shared_memory&) = delete;
  auto operator=(const shared_memory&) -> shared_memory& = delete;

  ~shared_memory() {
    reset();
  }

  explicit operator bool() const { return false; }
  auto empty() const -> bool { return true; }
  auto size() const -> uint { return 0; }
  auto acquired() const -> bool { return false; }
  auto acquire() -> uint8_t* { return nullptr; }
  auto release() -> void {}
  auto reset() -> void {}
  auto create(const string& name, uint size) -> bool { return false; }
  auto remove() -> void {}
  auto open(const string& name, uint size) -> bool { return false; }
  auto close() -> void {}
};

}