mirror of
https://github.com/golang/go
synced 2024-10-04 19:21:21 -06:00
81ed684a71
The original conversion in CL 132090043 cut up the function in an attempt to avoid converting most of the code to Go. This contorts the control flow. While debugging the onM signal stack bug, I reconverted sigqueue.goc in its entirety. This restores the original control flow, which is much easier to understand. The current conversion is correct, it's just complex and will be hard to maintain. The new one is as readable as the original code. I uploaded sigqueue.goc as the initial copy of sigqueue.go in the CL, so if you view the diffs of sigqueue.go comparing against patch set 2 [sic] it will show the actual starting point. For example: https://golang.org/cl/136160043/diff2/20001:60001/src/pkg/runtime/sigqueue.go LGTM=dvyukov, iant R=golang-codereviews, dvyukov, iant CC=golang-codereviews, khr, r https://golang.org/cl/136160043
30 lines
821 B
C
30 lines
821 B
C
// Copyright 2011 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
typedef byte* kevent_udata;
|
|
|
|
int32 runtime·thr_new(ThrParam*, int32);
|
|
void runtime·sigpanic(void);
|
|
void runtime·sigaltstack(SigaltstackT*, SigaltstackT*);
|
|
struct sigaction;
|
|
void runtime·sigaction(int32, struct sigaction*, struct sigaction*);
|
|
void runtime·sigprocmask(Sigset *, Sigset *);
|
|
void runtime·unblocksignals(void);
|
|
void runtime·setitimer(int32, Itimerval*, Itimerval*);
|
|
int32 runtime·sysctl(uint32*, uint32, byte*, uintptr*, byte*, uintptr);
|
|
|
|
enum {
|
|
SS_DISABLE = 4,
|
|
NSIG = 33,
|
|
SI_USER = 0x10001,
|
|
RLIMIT_AS = 10,
|
|
};
|
|
|
|
typedef struct Rlimit Rlimit;
|
|
struct Rlimit {
|
|
int64 rlim_cur;
|
|
int64 rlim_max;
|
|
};
|
|
int32 runtime·getrlimit(int32, Rlimit*);
|