Xapi_stdext_threads.Semaphoreval create : int -> tcreate n create a semaphore with initial value n (a positive integer). Raise Invalid_argument if n <= 0
val acquire : t -> int -> unitacquire k s block until the semaphore value is >= k (a positive integer), then atomically decrement the semaphore value by k. Raise Invalid_argument if k <= 0
val release : t -> int -> unitrelease k s atomically increment the semaphore value by k (a positive integer). Raise Invalid_argument if k <= 0
val execute_with_weight : t -> int -> (unit -> 'a) -> 'aval execute : t -> (unit -> 'a) -> 'aexecute s f same as {execute_with_weight} s 1 f