medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 03aead213b84fe914aa14bdfedd6fc4450194ce4
parent 8fbced816bf0d1af2daf93dbcd2310feb4a16798
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat Aug 20 20:56:17 +0100

Less const madness

Diffstat:
linux_semaphore.h | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/linux_semaphore.h b/linux_semaphore.h @@ -8,18 +8,18 @@ struct Semaphore { sem_t sem; }; -inline void semaphore_init( Semaphore * const sem ) { - const int ok = sem_init( &sem->sem, 0, 0 ); +inline void semaphore_init( Semaphore * sem ) { + int ok = sem_init( &sem->sem, 0, 0 ); if( ok == -1 ) { err( 1, "sem_init failed" ); } } -inline void semaphore_signal( Semaphore * const sem ) { +inline void semaphore_signal( Semaphore * sem ) { sem_post( &sem->sem ); } -inline void semaphore_wait( Semaphore * const sem ) { +inline void semaphore_wait( Semaphore * sem ) { sem_wait( &sem->sem ); }