sem The semaphore for which a value is to be returned. sval The location to be updated with the value of the semaphore indicated by the sem argument.