blob: d330ebf4fd07a98448b94e57490824fd6072cc17 [file] [log] [blame]
george.karpenkov29efa6d2017-08-21 23:25:50 +00001//===- FuzzerShmemWindows.cpp - Posix shared memory -------------*- C++ -* ===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9// SharedMemoryRegion
10//===----------------------------------------------------------------------===//
11#include "FuzzerDefs.h"
12#if LIBFUZZER_WINDOWS
13
14#include "FuzzerIO.h"
15#include "FuzzerShmem.h"
16
17#include <fcntl.h>
18#include <stdio.h>
19#include <sys/stat.h>
20#include <sys/types.h>
21
22namespace fuzzer {
23
24std::string SharedMemoryRegion::Path(const char *Name) {
25 return DirPlusFile(TmpDir(), Name);
26}
27
28std::string SharedMemoryRegion::SemName(const char *Name, int Idx) {
29 std::string Res(Name);
30 return Res + (char)('0' + Idx);
31}
32
33bool SharedMemoryRegion::Map(int fd) {
34 assert(0 && "UNIMPLEMENTED");
35 return false;
36}
37
38bool SharedMemoryRegion::Create(const char *Name) {
39 assert(0 && "UNIMPLEMENTED");
40 return false;
41}
42
43bool SharedMemoryRegion::Open(const char *Name) {
44 assert(0 && "UNIMPLEMENTED");
45 return false;
46}
47
48bool SharedMemoryRegion::Destroy(const char *Name) {
49 assert(0 && "UNIMPLEMENTED");
50 return false;
51}
52
53void SharedMemoryRegion::Post(int Idx) {
54 assert(0 && "UNIMPLEMENTED");
55}
56
57void SharedMemoryRegion::Wait(int Idx) {
58 Semaphore[1] = nullptr;
59 assert(0 && "UNIMPLEMENTED");
60}
61
62} // namespace fuzzer
63
64#endif // LIBFUZZER_WINDOWS