File: shared-memory.hpp

package info (click to toggle)
higan 098-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 11,904 kB
  • ctags: 13,286
  • sloc: cpp: 108,285; ansic: 778; makefile: 32; sh: 18
file content (27 lines) | stat: -rw-r--r-- 728 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* { 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 {}
};

}