Add more POSIX threads APIs

This commit is contained in:
Justine Tunney 2022-09-09 11:30:33 -07:00
parent 1729a8259c
commit c3208eb9d5
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
32 changed files with 592 additions and 87 deletions

View file

@ -7,19 +7,9 @@
http://creativecommons.org/publicdomain/zero/1.0/ │
*/
#endif
#include "libc/calls/calls.h"
#include "libc/fmt/itoa.h"
#include "libc/intrin/kprintf.h"
#include "libc/runtime/sysconf.h"
#include "libc/stdio/stdio.h"
int main(int argc, char *argv[]) {
int c, n;
char a[22], *p;
if ((c = GetCpuCount())) {
p = FormatInt64(a, c);
*p++ = '\n';
return write(1, a, p - a) == p - a ? 0 : 1;
} else {
return 1;
}
int main() {
kprintf("%d\n", GetCpuCount());
}