This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

sysbios question

Other Parts Discussed in Thread: SYSBIOS

Hi,

Has it been tested that c++ exception can be used in sysbios?

David

  • And is there any danger that exception causes environment corruption?

  • The MSDN information about C++ exception handling applies only to the Microsoft implementation. However, the TI C++ exception handling behaves somewhat similarly.

    Yes, if you make sure that an STL exception can never be thrown unless you are executing the same thread which will catch the exception, you should be OK. However, C++ exceptions cannot be thrown from one thread and caught in another, nor can they be used to exit a thread. This also implies that an STL object may not be shared between threads. Furthermore, if you are in a low-memory condition, it is possible to enter a condition where a C++ exception could corrupt the "emergency exception buffer" for all threads. There are more details I won't mention here. Suffice it to say that this is a complicated thing to use correctly, so the BIOS wiki simply advises against using C++ exceptions in a BIOS program.