Search code examples
vxworks

What is vxTas doing?


My job is to reimplement the vxWorks function BOOL vxTas (void * address) for Linux

I found some documentation via google. Is it right, that vxTas checks a variable and if it is not set it will set it and returns TRUE otherwise FALSE.


Solution

  • It's vxWork's implementation of a Test-and-Set instruction.

    See "Test-and-set on Wikipedia"