diff options
author | Steven Hartland <smh@FreeBSD.org> | 2015-01-17 14:44:59 +0000 |
---|---|---|
committer | Steven Hartland <smh@FreeBSD.org> | 2015-01-17 14:44:59 +0000 |
commit | bc96366c864c07ef352edb92017357917c75b36c (patch) | |
tree | 09e9633064b6303a8afc6891fff761eb6e399cee /cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c | |
parent | b0b74fb366450ac61b7df38daa92bc19cbfc3ecc (diff) | |
download | src-bc96366c864c07ef352edb92017357917c75b36c.tar.gz src-bc96366c864c07ef352edb92017357917c75b36c.zip |
Mechanically convert cddl sun #ifdef's to illumos
Since the upstream for cddl code is now illumos not sun, mechanically
convert all sun #ifdef's to illumos #ifdef's which have been used in all
newer code for some time.
Also do a manual pass to correct the use if #ifdef comments as per style(9)
as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos.
MFC after: 1 month
Sponsored by: Multiplay
Notes
Notes:
svn path=/head/; revision=277300
Diffstat (limited to 'cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c')
-rw-r--r-- | cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c b/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c index bc278b063de1..c0719620dbde 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c @@ -38,7 +38,7 @@ */ #include <pthread.h> -#if defined(sun) +#ifdef illumos #include <synch.h> #endif #include <stdio.h> @@ -49,7 +49,7 @@ void barrier_init(barrier_t *bar, int nthreads) { pthread_mutex_init(&bar->bar_lock, NULL); -#if defined(sun) +#ifdef illumos sema_init(&bar->bar_sem, 0, USYNC_THREAD, NULL); #else sem_init(&bar->bar_sem, 0, 0); @@ -66,7 +66,7 @@ barrier_wait(barrier_t *bar) if (++bar->bar_numin < bar->bar_nthr) { pthread_mutex_unlock(&bar->bar_lock); -#if defined(sun) +#ifdef illumos sema_wait(&bar->bar_sem); #else sem_wait(&bar->bar_sem); @@ -80,7 +80,7 @@ barrier_wait(barrier_t *bar) /* reset for next use */ bar->bar_numin = 0; for (i = 1; i < bar->bar_nthr; i++) -#if defined(sun) +#ifdef illumos sema_post(&bar->bar_sem); #else sem_post(&bar->bar_sem); |