use the locations specified in the bcm2708_boot header
[AROS.git] / rom / exec / freetaskstorageslot.c
blob0bdfb9aad7bc9a4686fb8a3f5c0a23acaca50ef5
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(LONG, slot, D0),
18 struct ExecBase *, SysBase, 181, Exec)
20 /* FUNCTION
21 This function will free a slot in taskstorage
23 INPUTS
24 slot - The slot to free.
26 RESULT
27 None.
29 NOTES
30 Currently no checks are performed to determine if one is the owner
31 of the slot. This may be added in the future, so one should
32 deallocate a slot 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 lose the freed slot */
53 return;
56 tsfs->FreeSlot = slot;
58 Forbid();
59 AddHead((struct List *)&PrivExecBase(SysBase)->TaskStorageSlots, (struct Node *)tsfs);
60 Permit();
62 AROS_LIBFUNC_EXIT