OCaml-Sem

Table of contents

General project information

Project description

Sem is an OCaml module implementing support of POSIX semaphores. The package contains code in C and OCaml programming languages. Once compiled it makes a usual OCaml library usable in both byte-code and native code development.

The initial goal of "ocaml-sem" project was to make a library which could be used by an OCaml programmer to operate with OS's POSIX semaphores. Since Google returned no result, I've decided to write my own code implementing a features the task could require.

The library implements an interface between OS POSIX semaphore API and OCaml-based application. The library is well self-documented since it builds the set of HTML documentation in traditional OCaml ocamldoc style.

Using this library a programmer can easily construct code creating, accessing and destroying POSIX semaphores. The set of semaphore operations contain all basic functions I've found in FreeBSD "sem" API:

The library is to be distributed as an open-source under the terms of BSD license which would allow the library to be freely used and/or co-developed by anyone.

More documentation on the library's interface and implementation can be found in the code which is well commented and documented according to basic OCaml documentation tradition.

README notice

This is OCaml "Sem" library. It is intended to be a first (AFAIK) try to implement POSIX semaphores in OCaml.

Further documentation on library installation and usage you may find in INSTALL and sem.mli files.

The library was made following the pattern of POSIX semaphore infrastructure of FreeBSD.

Since it's an early alpha you are welcome to change it or suggest new ideas in order to make it usable on any platform of your fantasy ;).

DONE:

TODO: BUGS: NOTES:

Getting the source

Installing

To build this package you should have:

Then, issue the following commands:
$ make all
$ make install

Additionally, you may

make docs
.

License

BSD License

Copyright (c) 2005, Paul Argentoff <argentoff at gmail.com> All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

OCamlMakefile notice

OCamlMakefile is a part of ocaml-make package by Markus Mottl; it is made under GNU LGPL and can be freely found at http://www.oefai.at/~markus

Links

Further OCamlDoc documentation

Index of types
Index of values
Index of modules

© Paul Argentoff, 2005