The main vpp heap is thread-safe, so yes, you can use clib_mem_alloc(...) / 
clib_mem_free(...). 

Please use the VLIB_REGISTER_THREAD(...) macro, which offers a number of 
controls beyond "just go spin up a thread..."

D.

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Prashant Upadhyaya
Sent: Wednesday, November 28, 2018 7:21 AM
To: [email protected]
Subject: [vpp-dev] Regarding own pthreads

Hi,

If I spawn some of my own pthreads from the main thread, then can I use the 
clib functions inside my own pthread, eg. clib_mem_alloc/free safely ?
In general, are there any guidelines to be followed regarding own pthreads, 
would appreciate any input on this front.

Regards
-Prashant
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11448): https://lists.fd.io/g/vpp-dev/message/11448
Mute This Topic: https://lists.fd.io/mt/28430132/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to