PERFORCE change 95368 for review
John Birrell
jb at FreeBSD.org
Sat Apr 15 23:36:01 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=95368
Change 95368 by jb at 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);
}
More information about the p4-projects
mailing list