From dfa5893d4f5a5724e36e1265eba4e148ca42911f Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 3 Dec 2008 14:21:28 -0800 Subject: preparation for exec. * syscall: add syscall.RawSyscall, which doesn't use sys.entersyscall/sys.exitsyscall add syscall.dup2 add syscall.BytePtrPtr add syscall.Rusage, RusagePtr add syscall.F_GETFD, F_SETFD, FD_CLOEXEC * runtime: clean up, correct signal handling. can now survive (continue running after) a signal. R=r DELTA=394 (286 added, 51 deleted, 57 changed) OCL=20351 CL=20369 --- src/runtime/runtime.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/runtime/runtime.h') diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h index 4b282c1265..e37786e4fb 100644 --- a/src/runtime/runtime.h +++ b/src/runtime/runtime.h @@ -48,6 +48,7 @@ typedef union Note Note; typedef struct Stktop Stktop; typedef struct String *string; typedef struct Usema Usema; +typedef struct SigTab SigTab; /* * per cpu declaration @@ -179,9 +180,15 @@ struct Alg }; struct SigTab { - int32 catch; + int32 flags; int8 *name; }; +enum +{ + SigCatch = 1<<0, + SigIgnore = 1<<1, + SigRestart = 1<<2, +}; // (will be) shared with go; edit ../cmd/6g/sys.go too. // should move out of sys.go eventually. @@ -305,8 +312,6 @@ uint8* sys·mmap(byte*, uint32, int32, int32, int32, uint32); void sys·memclr(byte*, uint32); void sys·setcallerpc(void*, void*); void* sys·getcallerpc(void*); -void sys·sigaction(int64, void*, void*); -void sys·rt_sigaction(int64, void*, void*, uint64); /* * runtime go-called -- cgit v1.3