mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-17 08:00:32 +00:00
Further improve ipv4.games server
This commit is contained in:
parent
3b4fcd8575
commit
32321ab1e9
9 changed files with 307 additions and 113 deletions
|
@ -16,6 +16,8 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/thread/posixthread.internal.h"
|
||||
#include "libc/thread/thread.h"
|
||||
#include "libc/thread/tls.h"
|
||||
|
||||
|
@ -25,3 +27,10 @@
|
|||
pthread_t pthread_self(void) {
|
||||
return __get_tls()->tib_pthread;
|
||||
}
|
||||
|
||||
static struct PosixThread pthread_main;
|
||||
__attribute__((__constructor__)) static void pthread_self_init(void) {
|
||||
pthread_main.tid = gettid();
|
||||
pthread_main.status = kPosixThreadMain;
|
||||
__get_tls()->tib_pthread = (pthread_t)&pthread_main;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue