Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 04 Mar 2016 23:21:49 +0100
From: Tomasz Sterna <tomek@...oka.com>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] add sched_getcpu

W dniu 02.03.2016, śro o godzinie 18∶26 -0500, użytkownik Rich Felker
napisał:
> The only safe way to make your own threads is to refrain from using
> libc at all and do your own syscalls. Even calling syscall() may not
> be safe (on i386/glibc it probably uses the vdso syscall pointer from
> TLS); you really need to use asm to make the syscall.

I understand.
Thank you for explaining.


> Is there a reason "pthreads is not a good way to do it"?

The thread API I am implementing differs much to pthreads, which
required a lot of glue code translating one API to another and felt
hand wrenching.
On the other hand implementing it on bare syscalls was refreshingly
simple.

But if I do not want to implement the whole libc with it, I will need
to revisit this idea.
C'est la vie...


-- 
 /o__ 
(_<^' The man on tops walks a lonely street; the "chain" of command is often a noose.


Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.