[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Many questions, mostly about mach-defpager
From: |
Thomas Thomas |
Subject: |
Re: Many questions, mostly about mach-defpager |
Date: |
Tue, 8 May 2012 18:21:40 -0700 (PDT) |
It would be. I don't write a lot of mutli-threaded code,
and I did not know that GCC supported __thread.
Well, now I know.
The implementation is much cleaner now.
Thanks,
Thomas
----- Original Message -----
From: Samuel Thibault <samuel.thibault@gnu.org>
To: Thomas Thomas <ricinwich@yahoo.com>
Cc: "bug-hurd@gnu.org" <bug-hurd@gnu.org>
Sent: Tuesday, May 8, 2012 12:29 PM
Subject: Re: Many questions, mostly about mach-defpager
Thomas Thomas, le Mon 30 Apr 2012 16:30:00 -0700, a écrit :
> Nextly, it uses cthread_data to store a pointer to a thread-specific buffer
> that it uses in paging. As I see it: all threads are created when the pager
> starts up, and no threads are created afterward. Thus, I could achieve the
> same result by using a hash to map between the thread handles and the
> buffer pointers. Would this be a good idea/efficient? Mainly, I just want
> your thoughts.
But why doing that? It'd be simpler to just use a __thread variable.
Samuel