pikpik 0 Newbie Poster

Hi,

As part of porting a (mostly C++) library[1] to a "new" operating system[2], I'm trying to link the library's semaphore class to the platform's semaphore implementation. The problem is that the library assumes that the semaphore implementation will be a modern POSIX one[3] but the operating system's semaphores are modeled after System V[4].

My question is primarily if anyone knows of a wrapper of C (or C++) code that will act as an emulation layer around the System V semaphores in a way that will present "modern" POSIX semaphores to the library I'm porting. A caveat is that any used code must be compatible with the BSD license.

Thank you,
pikpik


1. The library, semaphore example

http://code.google.com/p/v8/source/browse/branches/bleeding_edge/src/platform-openbsd.cc#488


2. The operating system

http://www.minix3.org/


3. POSIX Semaphores

http://www.opengroup.org/onlinepubs/009695399/basedefs/semaphore.h.html


4. The operating system's System V semaphore implementation

http://gforge.cs.vu.nl/gf/project/minix/scmsvn/?action=browse&path=%2Ftrunk%2Fsrc%2Finclude%2Fsys%2Fsem.h&view=markup

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.