Date: Sat, 15 Apr 2006 23:36:00 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95368 for review Message-ID: <200604152336.k3FNa0lk061098@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95368 Change 95368 by jb@jb_freebsd2 on 2006/04/15 23:35:29 SysV -> BSD signal handling. Lots of Solaris specific files here. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c#2 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c#2 (text) ==== @@ -177,16 +177,22 @@ #include <unistd.h> #include <pthread.h> #include <assert.h> +#if defined(sun) #include <synch.h> +#endif #include <signal.h> #include <libgen.h> #include <string.h> #include <errno.h> +#if defined(sun) #include <alloca.h> +#endif #include <sys/param.h> #include <sys/types.h> #include <sys/mman.h> +#if defined(sun) #include <sys/sysconf.h> +#endif #include "ctf_headers.h" #include "ctftools.h" @@ -230,7 +236,9 @@ { size_t big, *size; int sizes, i; +#if defined(sun) struct memcntl_mha mha; +#endif /* * First, get the available pagesizes. @@ -259,6 +267,7 @@ if (brk((void *)((((uintptr_t)sbrk(0) - 1) & ~(big - 1)) + big)) != 0) return; +#if defined(sun) /* * Finally, set our heap to use the largest page size for which the * MC_HAT_ADVISE doesn't return EAGAIN. @@ -275,6 +284,7 @@ if (errno != EAGAIN) break; } +#endif } static void @@ -700,9 +710,15 @@ wq); } +#if defined(sun) sigset(SIGINT, handle_sig); sigset(SIGQUIT, handle_sig); sigset(SIGTERM, handle_sig); +#else + signal(SIGINT, handle_sig); + signal(SIGQUIT, handle_sig); + signal(SIGTERM, handle_sig); +#endif pthread_sigmask(SIG_UNBLOCK, &sets, NULL); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604152336.k3FNa0lk061098>