Multiple Threads using Codec Engine Handle

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Within a process, all threads can technically share the same Engine handle returned from Engine_open(). However, as documented in the Engine_open() API Reference Guide, this Engine handle is not thread safe, meaning only one thread should us it at a time.

The common, and recommended usage for multi-threaded applications is to, rather than have one thread obtain Engine handle and share it, have each thread independently call Engine_open() to obtain its own Engine handle. As expected, before exiting, each thread should also call Engine_close().

The order is not important. In homogeneous multicore systems, the slave will be loaded when the first thread calls Engine_open(); other Engine_open() calls will return unique Engine handles, and increment a reference count on the slave device. Once the last thread calls Engine_close(), the reference count will reach zero and the slave will be unloaded/stopped.

Finally, note that these details are all local to a single process. When multiple applications may need to use a slave processor, they should be configured to use the Link Arbiter Daemon - LAD.

E2e.jpg For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Multiple Threads using Codec Engine Handle here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment

Comments

Comments on Multiple Threads using Codec Engine Handle


ChrisRing said ...

This article is probably too short to live on its own and should be merged into a FAQ and/or users guide.

--ChrisRing 11:15, 8 April 2011 (CDT)

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox