123456789101112131415161718192021222324(* This file is part of Luv, released under the MIT license. See LICENSE.md for
details, or visit https://github.com/aantron/luv/blob/master/LICENSE.md. *)typet=C.Types.Semaphore.tCtypes.ptrletinitcount=letsemaphore=Ctypes.addr(Ctypes.makeC.Types.Semaphore.t)inC.Functions.Semaphore.initsemaphore(Unsigned.UInt.of_intcount)|>Error.to_resultsemaphoreletdestroy=C.Functions.Semaphore.destroyletpost=C.Functions.Semaphore.postletwait=C.Blocking.Semaphore.waitlettrywaitsemaphore=C.Functions.Semaphore.trywaitsemaphore|>Error.to_result()