mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-26 04:20:30 +00:00
Make POSIX threads improvements
- Ensure SIGTHR isn't blocked in newly created threads - Use TIB rather than thread_local for thread atexits - Make POSIX thread keys atomic within thread - Don't bother logging prctl() to --strace - Log thread destructor names to --strace
This commit is contained in:
parent
387310c659
commit
76957983cf
11 changed files with 57 additions and 71 deletions
|
@ -1,39 +0,0 @@
|
|||
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│
|
||||
│ vi: set et ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi │
|
||||
╞══════════════════════════════════════════════════════════════════════════════╡
|
||||
│ Copyright 2022 Justine Alexandra Roberts Tunney │
|
||||
│ │
|
||||
│ Permission to use, copy, modify, and/or distribute this software for │
|
||||
│ any purpose with or without fee is hereby granted, provided that the │
|
||||
│ above copyright notice and this permission notice appear in all copies. │
|
||||
│ │
|
||||
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │
|
||||
│ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED │
|
||||
│ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE │
|
||||
│ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL │
|
||||
│ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR │
|
||||
│ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER │
|
||||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/describeflags.internal.h"
|
||||
#include "libc/sysv/consts/pr.h"
|
||||
|
||||
const char *DescribePrctlOperation(int x) {
|
||||
switch (x) {
|
||||
case PR_GET_NAME:
|
||||
return "PR_GET_NAME";
|
||||
case PR_SET_NO_NEW_PRIVS:
|
||||
return "PR_SET_NO_NEW_PRIVS";
|
||||
case PR_SET_SECCOMP:
|
||||
return "PR_SET_SECCOMP";
|
||||
case PR_GET_SECCOMP:
|
||||
return "PR_GET_SECCOMP";
|
||||
case PR_CAPBSET_READ:
|
||||
return "PR_CAPBSET_READ";
|
||||
case PR_CAPBSET_DROP:
|
||||
return "PR_CAPBSET_DROP";
|
||||
default:
|
||||
return "PRCTL_???";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue