]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Revert "LWP: remove ucontext header from preempt module"
authorAndrew Deason <adeason@sinenomine.net>
Mon, 28 Feb 2011 20:03:46 +0000 (14:03 -0600)
committerDerrick Brashear <shadow@dementia.org>
Tue, 8 Mar 2011 04:26:08 +0000 (20:26 -0800)
This reverts commit fbac809a46376fcf60d3dcedc0be962c43d9c74e.

The ucontext header is only included in lwp.h for platforms that use
ucontext as a means for context-switching in LWP. The preempt module
needs the ucontext header for signal handling on some platforms (at
least Solaris). So, ucontext.h may not be included by lwp.h on these
platforms, if that platform does not use ucontext for LWP
context-switching. So we need to explicitly include ucontext.h in
preempt.c.

Reviewed-on: http://gerrit.openafs.org/4095
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 2681c49ada5679922f949e9c7d0010f2ee705dab)

Change-Id: Ie1858dc4e7dfc6e9db4a4f63deda8018645f9111
Reviewed-on: http://gerrit.openafs.org/4162
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/lwp/preempt.c

index c8dca46ee7d81d1078b7e82d3450727518df5742..0ca9b5fea57fa6c70cc64106f32a8ef81ae7d832 100644 (file)
@@ -40,6 +40,9 @@ PRE_EndPreempt(void)
 #else
 #include <sys/time.h>
 #include <signal.h>
+#ifdef HAVE_UCONTEXT_H
+#include <ucontext.h>
+#endif
 
 #if defined(AFS_OSF_ENV) || defined(AFS_S390_LINUX20_ENV)
 int PRE_Block = 0;             /* used in lwp.c and process.s */