forked from xcore/sc_util
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Lacey
committed
Apr 3, 2013
1 parent
b9d21d7
commit d649b8b
Showing
6 changed files
with
53 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,5 @@ int main() | |
use_swlock(6); | ||
} | ||
free_locks(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DOXYGEN_DIRS=.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Lock handling library | ||
===================== | ||
|
||
This module provides access to hardware and software locks for use in | ||
concurrent C programs. In general it is not safe to use these to | ||
marshall within XC due to the assumptions XC | ||
makes about safe concurrent data access. | ||
|
||
Two types of locks are provided. Hardware locks are fast and power | ||
efficient but there are a limited number per tile. Software locks are | ||
slower but you can use an unlimited number of them. | ||
|
||
Hardware lock API | ||
----------------- | ||
|
||
.. doxygentypedef:: hwlock_t | ||
|
||
.. doxygenfunction:: hwlock_alloc | ||
.. doxygenfunction:: hwlock_free | ||
.. doxygenfunction:: hwlock_acquire | ||
.. doxygenfunction:: hwlock_release | ||
|
||
Software lock API | ||
----------------- | ||
|
||
.. doxygentypedef:: swlock_t | ||
|
||
.. doxygendefine:: SWLOCK_INITIAL_VALUE | ||
|
||
.. doxygenfunction:: swlock_init | ||
.. doxygenfunction:: swlock_try_acquire | ||
.. doxygenfunction:: swlock_acquire | ||
.. doxygenfunction:: swlock_release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ | |
<docdir>module_random/doc</docdir> | ||
<docdir>module_xassert/doc</docdir> | ||
<docdir>module_logging/doc</docdir> | ||
<docdir>module_locks/doc</docdir> | ||
<exclude_dir>tests</exclude_dir> | ||
<location>[email protected]:xcore/sc_util</location> | ||
<name>sc_util</name> | ||
|