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/memory.h>
13 #include <exec/lists.h>
14 #include <proto/exec.h>
16 /*****************************************************************************
19 AROS_LH0(void *, CreateCondition
,
24 struct ThreadBase
*, ThreadBase
, 15, Thread
)
27 Creates a condition variable.
33 The newly created condition, or NULL if one couldn't be created.
36 Condition cond = CreateCondition();
43 DestroyCondition(), WaitCondition(), SignalCondition(),
48 *****************************************************************************/
55 if ((c
= AllocMem(sizeof(struct _Condition
), MEMF_PUBLIC
)) == NULL
)
59 InitSemaphore(&c
->lock
);
66 } /* CreateCondition */