2 * thread.library - threading and synchronisation primitives
4 * Copyright © 2007 Robert Norris
6 * This program is free software; you can redistribute it and/or modify it
7 * under the same terms as AROS itself.
10 #include "thread_intern.h"
12 #include <exec/lists.h>
13 #include <proto/thread.h>
15 /*****************************************************************************
18 AROS_LH0(void, WaitAllThreads
,
23 struct ThreadBase
*, ThreadBase
, 7, Thread
)
26 Blocks the current task until all threads exit.
32 This function always succeeds.
35 This function will ignore detached threads.
43 CreateThread(), CurrentThread(), DetachThread(), WaitThread()
47 *****************************************************************************/
51 struct _Thread
*thread
, *next
;
53 ForeachNodeSafe(&ThreadBase
->threads
, thread
, next
)
54 WaitThread(thread
->id
, NULL
);
57 } /* WaitAllThreads */