Home | History | Annotate | Line # | Download | only in fuzzer
      1 //===- 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 
     22 namespace fuzzer {
     23 
     24 std::string SharedMemoryRegion::Path(const char *Name) {
     25   return DirPlusFile(TmpDir(), Name);
     26 }
     27 
     28 std::string SharedMemoryRegion::SemName(const char *Name, int Idx) {
     29   std::string Res(Name);
     30   return Res + (char)('0' + Idx);
     31 }
     32 
     33 bool SharedMemoryRegion::Map(int fd) {
     34   assert(0 && "UNIMPLEMENTED");
     35   return false;
     36 }
     37 
     38 bool SharedMemoryRegion::Create(const char *Name) {
     39   assert(0 && "UNIMPLEMENTED");
     40   return false;
     41 }
     42 
     43 bool SharedMemoryRegion::Open(const char *Name) {
     44   assert(0 && "UNIMPLEMENTED");
     45   return false;
     46 }
     47 
     48 bool SharedMemoryRegion::Destroy(const char *Name) {
     49   assert(0 && "UNIMPLEMENTED");
     50   return false;
     51 }
     52 
     53 void SharedMemoryRegion::Post(int Idx) {
     54   assert(0 && "UNIMPLEMENTED");
     55 }
     56 
     57 void SharedMemoryRegion::Wait(int Idx) {
     58   Semaphore[1] = nullptr;
     59   assert(0 && "UNIMPLEMENTED");
     60 }
     61 
     62 }  // namespace fuzzer
     63 
     64 #endif  // LIBFUZZER_WINDOWS
     65