george.karpenkov | 29efa6d | 2017-08-21 23:25:50 +0000 | [diff] [blame] | 1 | //===- FuzzerShmemWindows.cpp - Posix shared memory -------------*- C++ -* ===// |
| 2 | // |
chandlerc | 4028449 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // 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.karpenkov | 29efa6d | 2017-08-21 23:25:50 +0000 | [diff] [blame] | 6 | // |
| 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 | |
| 21 | namespace fuzzer { |
| 22 | |
| 23 | std::string SharedMemoryRegion::Path(const char *Name) { |
| 24 | return DirPlusFile(TmpDir(), Name); |
| 25 | } |
| 26 | |
| 27 | std::string SharedMemoryRegion::SemName(const char *Name, int Idx) { |
| 28 | std::string Res(Name); |
| 29 | return Res + (char)('0' + Idx); |
| 30 | } |
| 31 | |
| 32 | bool SharedMemoryRegion::Map(int fd) { |
| 33 | assert(0 && "UNIMPLEMENTED"); |
| 34 | return false; |
| 35 | } |
| 36 | |
| 37 | bool SharedMemoryRegion::Create(const char *Name) { |
| 38 | assert(0 && "UNIMPLEMENTED"); |
| 39 | return false; |
| 40 | } |
| 41 | |
| 42 | bool SharedMemoryRegion::Open(const char *Name) { |
| 43 | assert(0 && "UNIMPLEMENTED"); |
| 44 | return false; |
| 45 | } |
| 46 | |
| 47 | bool SharedMemoryRegion::Destroy(const char *Name) { |
| 48 | assert(0 && "UNIMPLEMENTED"); |
| 49 | return false; |
| 50 | } |
| 51 | |
| 52 | void SharedMemoryRegion::Post(int Idx) { |
| 53 | assert(0 && "UNIMPLEMENTED"); |
| 54 | } |
| 55 | |
| 56 | void SharedMemoryRegion::Wait(int Idx) { |
| 57 | Semaphore[1] = nullptr; |
| 58 | assert(0 && "UNIMPLEMENTED"); |
| 59 | } |
| 60 | |
| 61 | } // namespace fuzzer |
| 62 | |
| 63 | #endif // LIBFUZZER_WINDOWS |