mutek/thread.h header reference
[Kernel services module]

The source code of this header can be browsed online.

Description [link] 

Kernel thread service

Members [link] 

Type [link] 

Function [link] 

  • error_t thread_create(context_entry_t *entry, void *arg, const struct thread_attr_s *attr)

Macro [link] 

Members detail [link] 

#define MUTEK_THREAD_H_ [link] 

This macro is declared in mutek/thread.h source file, line 21.

#define THREAD_ATTR_INITIALIZER [link] 

This macro is declared in mutek/thread.h source file, line 47.

Default initializer for struct thread_attr_s

struct thread_attr_s [link] 

This struct is declared in mutek/thread.h source file, line 38.

Thread attributes for the thread_create function.

FieldDescription
size_t stack_size;Byte size of the thread stack
enum mem_scope_e scope;Memory allocation scope for the thread and associated stack
struct cpu_tree_s * cpu;Processor affinity or NULL

error_t thread_create(context_entry_t *entry, void *arg, const struct thread_attr_s *attr) [link] 

This function is declared in mutek/thread.h source file, line 76.

this function creates a standalone scheduler context. This allocates the thread object and its stack then push the thread in the scheduler running queue.

The entry point function is called with the arg argument when the new thread is first scheduled.

Context data and stack are freed when the entry point function returns. There is no special function to call before entry point exit.

Parameter list:

  • entry: Entry point
  • arg: Entry point argument
  • attr: Thread attributes, may be NULL.

The return value is 0 when done, -ENOMEM if allocation failed.

This is available when CONFIG_MUTEK_THREAD is defined.

Valid XHTML 1.0 StrictGenerated by diaxen on Thu Aug 4 15:44:06 2022 using MkDoc