Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disable/enable tasking functions

Status
Not open for further replies.

cindy13732

Technical User
Jun 9, 2011
9
US
I am translating C code from the VAX environment to the PC using Borland 6. In the VAX code there are 2 functions called TSKLock and TSKUnlock. They are replaced by EnableTasking and DisableTasking in the Borland environment based on #define statements.


# if (_UNIX || VXWORKS || VAX)
# define SA_Disable TSKLock();
# define SA_Enable TSKUnlock();
# endif

# if (BORLANDC)
# define SA_Disable DisableTasking()
# define SA_Enable EnableTasking()
# endif

# define Enable SA_Enable
# define Disable SA_Disable

I cannot find any of these functions in either environment.

Can anyone tell me where to get them or what is in them, so that I can get my code to compile?
 
I have found that the instructions I really need are:

asm (" cli");
asm (" sti");

However, when i try to execute them, I get privilege exceptions.

Does anyone know how to change the privilege so that these will execute?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top