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.

SemCreate() or SEM_create.



Dear TI

I'm using a DSK6455 kit, CCS v4, BIOS 5.0 API and NDK tools. Can I use SEM_create (BIOS 5.0)  with TaskCreate() (NDK)?, Is NDK API compatible with BIOS 5.0 API?

In spru524h document, I read that timeout in SemPend can be BIOS_WAIT_FOREVER, then I write  SemPend(hSema_send,BIOS_WAIT_FOREVER), but the build fails with the message: identifier "BIOS_WAIT_FOREVER" is undefined.

Please, where is defined BIOS_WAIT_FOREVER?

Best regards.

Manuel Fernández Ros


  • BIOS_WAIT_FOREVER is a constant from BIOS 6.x.   The BIOS 5.x equivalent is SYS_FOREVER.   Both constants are defined to be (-1).

    You should probably use the SEM module for semaphore services.    And the TSK module for task services.   The "SemPend", etc. and TaskCreate, etc. APIs are part of an OS abstraction layer (OSAL) that the NDK uses to allow the NDK to be used with other operating systems besides DSP/BIOS and SYS/BIOS.  This OSAL is intended to be used by the NDK and not typically the application itself. 

    But, to answer your question, SEM_pend can be used with a task that is created with TaskCreate().   You should be able to find the source for SemPend() in the os directory of your NDK sources.  If you look there, you will see that it is a set of simple C functions that wrap the underlying SYS/BIOS or DSP/BIOS APIs.

    Regards,
    -Karl-