blob: 0187566d4ec47a272c1afe53d55207b8d46a271f [file] [log] [blame]
george.karpenkov29efa6d2017-08-21 23:25:50 +00001//===- FuzzerShmemWindows.cpp - Posix shared memory -------------*- C++ -* ===//
2//
chandlerc40284492019-01-19 08:50:56 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
george.karpenkov29efa6d2017-08-21 23:25:50 +00006//
7//===----------------------------------------------------------------------===//
8// SharedMemoryRegion
9//===----------------------------------------------------------------------===//
10#include "FuzzerDefs.h"
11#if LIBFUZZER_WINDOWS
12
13#include "FuzzerIO.h"
14#include "FuzzerShmem.h"
15
16#include <fcntl.h>
17#include <stdio.h>
18#include <sys/stat.h>
19#include <sys/types.h>
20
21namespace fuzzer {
22
23std::string SharedMemoryRegion::Path(const char *Name) {
24 return DirPlusFile(TmpDir(), Name);
25}
26
27std::string SharedMemoryRegion::SemName(const char *Name, int Idx) {
28 std::string Res(Name);
29 return Res + (char)('0' + Idx);
30}
31
32bool SharedMemoryRegion::Map(int fd) {
33 assert(0 && "UNIMPLEMENTED");
34 return false;
35}
36
37bool SharedMemoryRegion::Create(const char *Name) {
38 assert(0 && "UNIMPLEMENTED");
39 return false;
40}
41
42bool SharedMemoryRegion::Open(const char *Name) {
43 assert(0 && "UNIMPLEMENTED");
44 return false;
45}
46
47bool SharedMemoryRegion::Destroy(const char *Name) {
48 assert(0 && "UNIMPLEMENTED");
49 return false;
50}
51
52void SharedMemoryRegion::Post(int Idx) {
53 assert(0 && "UNIMPLEMENTED");
54}
55
56void SharedMemoryRegion::Wait(int Idx) {
57 Semaphore[1] = nullptr;
58 assert(0 && "UNIMPLEMENTED");
59}
60
61} // namespace fuzzer
62
63#endif // LIBFUZZER_WINDOWS