X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fsemaphore.h;h=7b211f8e1c9d1d3a0b746bad68531074b87c9c41;hb=ec6703bb4d58e504fde8ea8429f9b26ab6632696;hp=cd01512c0ff10c7bd8d97ce918ac823403ad3198;hpb=fa7aa6d9457616ce28f97c83eaa616d0ff276870;p=libucw.git diff --git a/ucw/semaphore.h b/ucw/semaphore.h index cd01512c..7b211f8e 100644 --- a/ucw/semaphore.h +++ b/ucw/semaphore.h @@ -23,8 +23,7 @@ /* In Darwin, sem_init() is unfortunately not implemented and the guide * recommends emulating it using sem_open(). */ -static inline sem_t * -sem_alloc(void) +static inline sem_t *sem_alloc(void) { char buf[TEMP_FILE_NAME_LEN]; int mode, retry = 10; @@ -39,16 +38,14 @@ sem_alloc(void) return sem; } -static inline void -sem_free(sem_t *sem) +static inline void sem_free(sem_t *sem) { sem_close(sem); } #else -static inline sem_t * -sem_alloc(void) +static inline sem_t *sem_alloc(void) { sem_t *sem = xmalloc(sizeof(sem_t)); int res = sem_init(sem, 0, 0); @@ -56,8 +53,7 @@ sem_alloc(void) return sem; } -static inline void -sem_free(sem_t *sem) +static inline void sem_free(sem_t *sem) { sem_destroy(sem); xfree(sem);