GoldFish Engine
Quite simple and lightweight game engine
Loading...
Searching...
No Matches
gf_thread.h File Reference

Thread interface. More...

#include <gf_pre.h>
#include <gf_macro.h>
#include <gf_type/thread.h>

Go to the source code of this file.

Functions

gf_thread_tgf_thread_create (void(*func)(void *), void *userdata)
 Create thread.
 
void gf_thread_join (gf_thread_t *thread)
 Join thread.
 
void gf_thread_destroy (gf_thread_t *thread)
 Destroy thread.
 

Detailed Description

Thread interface.

Definition in file gf_thread.h.

Function Documentation

◆ gf_thread_create()

gf_thread_t * gf_thread_create ( void(*)(void *)  func,
void *  userdata 
)
extern

Create thread.

Parameters
funcFunction to be called for thread
userdataData to be passed to thread
Returns
Thread

Definition at line 22 of file gf_thread.c.

◆ gf_thread_destroy()

void gf_thread_destroy ( gf_thread_t thread)
extern

Destroy thread.

Parameters
threadThread

Definition at line 36 of file gf_thread.c.

◆ gf_thread_join()

void gf_thread_join ( gf_thread_t thread)
extern

Join thread.

Parameters
threadThread

Definition at line 31 of file gf_thread.c.