Skip to content
Commit f492fc99 authored by Yann Droneaud's avatar Yann Droneaud Committed by Florian Weimer
Browse files

<semaphore.h>: Add nonnull attributes

Except the following functions, NPTL implementation assume sem_t
argument (or other arguments) are not NULL, so they would benefit
from having the nonnull attribute.

- sem_close(): can cope with a NULL sem_t and return -1 with error EINVAL;
- sem_destroy(): does nothing at all

	* sysdeps/pthread/semaphore.h (sem_init): Add __nonnull attribute.
	(sem_destroy, sem_open, sem_close, sem_unlink): Likewise.
	(sem_wait, sem_timedwait, sem_trywait, sem_post): Likewise.
	(sem_getvalue): Likewise.
parent c57afec0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment