I'm trying to create a mailbox on a Windows 7 OS in Eclipse IDE and in debug mode. I'm trying to create a RTOS(Real time operating system) like mailbox in Windows using Eclipse.
This is what my code for the mailbox looks like so far:
RTX_Mailbox RTX_CreateMailbox (unsigned long nSlotSize, unsigned long nSlots, char* szName)
{
::EnterCriticalSection (&csMailboxLock);
CMailBox* pNewMailbox = new CMailBox (nSlotSize, szName);
aMailBoxes.push_back (pNewMailbox);
RTX_Mailbox mailBox = ((unsigned int)aMailBoxes.size ()) - 1;
::LeaveCriticalSection (&csMailboxLock);
return mailBox;
}
My application keeps crashing on run-time as soon as it hits ::EnterCriticalSection(&csMailboxLock);
It returns this error message(highlighted in the pic attached):
Error message in text: No source available for ntdll!TpCallbackMayRunLong() at 0x77d78e19
Please let me know if further details are required...