Jan Dvořák <firstname.lastname@example.org>
Linux eventfd interface for Racket.
|(require eventfd)||package: eventfd|
Interface that allows manipulation of Linux eventfd descriptors in a way similar to Racket’s semaphores.
Predicate identifying an event descriptor structure. These event descriptors also act as a synchronizable event that produces same results as eventfd-wait would.
initial-value : exact-nonnegative-integer? semaphore? : boolean? = #f
Create completely new event descriptor. Remember that these count towards process file descriptor count.
Create an eventfd? structure for an existing descriptor. It is undefined what happens when you pass it something that is not a valid event descriptor.
Post given value to the semaphore.
Wait until the semaphore represented by the descriptor becomes higher than zero and then return either it’s value, resetting it back to zero (when #:semaphore? set to #f) or return just 1, decrementing the semaphore.
Return event descriptor as an integer.