make.tmpl: Indicate what includes are being built
[AROS.git] / rom / exec / freetaskstorageslot.c
blob75945c5eaf83c1f4b3472490189e85279a1e8887
1 /*
2 Copyright © 2011, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "exec_intern.h"
7 #include "taskstorage.h"
9 /*****************************************************************************
11 NAME */
12 #include <proto/exec.h>
14 AROS_LH1(void, FreeTaskStorageSlot,
16 /* LOCATION */
17 AROS_LHA(int, slot, D0),
18 struct ExecBase *, SysBase, 181, Exec)
20 /* FUNCTION
21 This function will free a slot in taskstorage
23 INPUTS
24 The slot to free.
26 RESULT
27 None
29 NOTES
30 Currently no checks are performed if one is owner of the slot.
31 This may be added in the future so one should deallocate a slot
32 from the same task that allocated the slot.
34 EXAMPLE
36 BUGS
38 SEE ALSO
39 AllocTaskStorageSlot()
41 INTERNALS
43 ******************************************************************************/
45 AROS_LIBFUNC_INIT
47 struct TaskStorageFreeSlot *tsfs =
48 AllocMem(sizeof(struct TaskStorageFreeSlot), MEMF_PUBLIC|MEMF_CLEAR);
50 if (tsfs == NULL)
52 /* Don't do anything, we'll just loose the freed slot */
53 return;
56 tsfs->FreeSlot = slot;
58 AddHead((struct List *)&PrivExecBase(SysBase)->TaskStorageSlots, (struct Node *)tsfs);
60 AROS_LIBFUNC_EXIT