Re: [AD] Get thread id

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Fri Aug 17, 2012, Elias Pschernig wrote:
> On Fri, 17 Aug 2012 10:45:18 -0600
> 
> Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > While I'm sure that could work it feels kinda icky. What about using
> > gettid? (or if not available, `syscall(__NR_gettid)`).
> 
> Maybe best to use getpid() or gettid() under Linux, and use
> pthread_self() elsewhere for now (and then adjust to something better
> for each platform as is needed).
> 
> On the other hand SDL supports a lot more platforms than Allegro, so if
> pthread_self() is good enough for them... :)

That's assuming they've tested it ;)

> ---------------------------------------------------------------------------
> --- Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/