Re: [AD] Get thread id

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


What if we change (uint32_t)pthread_self to (uint32_t)getpid();

On Fri, Aug 17, 2012 at 3:53 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> On Fri, 17 Aug 2012 15:15:23 +0300, Dimitris Zenios <dimitris.zenios@xxxxxxxxxx> wrote:
>> Patch to add al_get_thread_id.
>
> The pthread implementation is not portable:
>
>     POSIX.1 allows an implementation wide freedom in choosing the type
>     used to represent a thread ID; for example, representation using
>     either an arithmetic type or a structure is permitted.
>
> It could also be wider than 32-bits.
>
> Peter
>
> ------------------------------------------------------------------------------
> 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/
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers




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