KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
kthread_attr_t Struct Reference

Thread creation attributes. More...

#include <kos/thread.h>

Data Fields

bool create_detached
 1 for a detached thread.
 
size_t stack_size
 Set the size of the stack to be created.
 
void * stack_ptr
 Pre-allocate a stack for the thread.
 
prio_t prio
 Set the thread's priority.
 
const char * label
 Thread label.
 

Detailed Description

Thread creation attributes.

This structure allows you to specify the various attributes for a thread to have when it is created. These can only be modified (in general) at thread creation time (with the exception of detaching a thread, which can be done later with thd_detach()).

Leaving any of the attributes in this structure 0 will set them to their default value.

Field Documentation

◆ create_detached

bool kthread_attr_t::create_detached

1 for a detached thread.

◆ label

const char* kthread_attr_t::label

Thread label.

◆ prio

prio_t kthread_attr_t::prio

Set the thread's priority.

◆ stack_ptr

void* kthread_attr_t::stack_ptr

Pre-allocate a stack for the thread.

Note
If you use this attribute, you must also set stack_size.

◆ stack_size

size_t kthread_attr_t::stack_size

Set the size of the stack to be created.


The documentation for this struct was generated from the following file: