PatchworkOS
Loading...
Searching...
No Matches
thrd_create.c File Reference
#include <stdatomic.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/proc.h>
#include <threads.h>
#include "user/common/syscalls.h"
#include "user/common/thread.h"

Go to the source code of this file.

Data Structures

struct  _entry_ctx_t
 

Functions

static _THREAD_ENTRY_ATTRIBUTES void _thread_entry (_thread_t *thread)
 
int thrd_create (thrd_t *thr, thrd_start_t func, void *arg)
 

Variables

fd_t klog = ERR
 

Function Documentation

◆ _thread_entry()

static _THREAD_ENTRY_ATTRIBUTES void _thread_entry ( _thread_t thread)
static

Definition at line 19 of file thrd_create.c.

References _entry_ctx_t::arg, free(), _entry_ctx_t::func, _thread_t::private, and thrd_exit().

Referenced by thrd_create().

◆ thrd_create()

int thrd_create ( thrd_t thr,
thrd_start_t  func,
void *  arg 
)

Variable Documentation

◆ klog

fd_t klog = ERR

Definition at line 11 of file thrd_create.c.

Referenced by init_process_spawn(), main(), spawn_program(), taskbar_new(), and thrd_create().