Changeset 0f4f1b2 in mainline for kernel/generic/include/proc/thread.h


Ignore:
Timestamp:
2024-01-15T17:10:27Z (18 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
e82879c
Parents:
a064d4f
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-15 16:37:22)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-15 17:10:27)
Message:

Add (and use) functions thread_start() and thread_detach()

Mostly cosmetic, with thread_start() replacing calls to thread_ready(),
but not consuming the passed reference, and thread_detach() being
synonym for thread_put(). Makes the code's function more obvious.

Also modify some threaded tests to use thread_join() for waiting,
instead of counting threads with atomics or semaphores.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/proc/thread.h

    ra064d4f r0f4f1b2  
    185185extern void thread_wire(thread_t *, cpu_t *);
    186186extern void thread_attach(thread_t *, task_t *);
     187extern void thread_start(thread_t *);
    187188extern void thread_ready(thread_t *);
    188189extern void thread_exit(void) __attribute__((noreturn));
     
    242243extern errno_t thread_join(thread_t *);
    243244extern errno_t thread_join_timeout(thread_t *, uint32_t, unsigned int);
     245extern void thread_detach(thread_t *);
    244246
    245247extern void thread_yield(void);
Note: See TracChangeset for help on using the changeset viewer.