Doc updates

This commit is contained in:
Ross Owen
2012-08-30 14:21:17 +01:00
parent e449050b40
commit 99cdee6e2b
45 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
/** lock.S
* @brief Functions for using hardware locks
* @author Ross Owen, XMOS Limited
*/
#include <xs1_user.h>
/////////////////////////////////////////////////////////////////////////
// void GetLockResource()
.extern GetLockResource
.globl GetLockResource.nstackwords
.linkset GetLockResource.nstackwords, 0
.globl GetLockResource
.text
GetLockResource:
getr r0, XS1_RES_TYPE_LOCK
retsp 0
/////////////////////////////////////////////////////////////////////////
// void ClaimLock(lock l)
.extern ClaimLock
.globl ClaimLock.nstackwords
.linkset ClaimLock.nstackwords, 0
.globl ClaimLock
.text
ClaimLock:
in r0, res[r0]
retsp 0
/////////////////////////////////////////////////////////////////////////
// void FreeLock(lock l)
.extern FreeLock
.globl FreeLock.nstackwords
.linkset FreeLock.nstackwords, 0
.globl FreeLock
.text
FreeLock:
out res[r0], r0
retsp 0
/////////////////////////////////////////////////////////////////////////
// void FreeLockResource(lock l)
.extern FreeLockResource
.globl FreeLockResource.nstackwords
.linkset FreeLockResource.nstackwords, 0
.globl FreeLockResource
.text
FreeLockResource:
freer res[r0]
retsp 0