tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pthread library related

Please see my comments inline.

2016-05-26 14:35 GMT-07:00 Christos Zoulas <>:

> On May 26,  2:08pm, (Charles Cui) wrote:
> -- Subject: Re: pthread library related
> | Hi Christos,
> |
> |    I am studying the pthread libraries in netbsd, and have several
> patches
> | completed.
> | I have attached all of them, which is pretty easy, but can fix some
> | problems in user land.
> | Note that some of them needs to add more logic. If you can, please give
> me
> | some comments on them.
> I'll send a separate mail.
> | For the pthread part, I found a deep understanding is necessary to
> | implement the feature
> | such as cross process synchronization. Also, I found a patch which is
> | written by ad (
> | I found that patch implements some functions that I need, I am right now
> | focusing on how to port
> | that patch to my work.
> Sounds good. I would also look at the FreeBSD implementation.
> | Also, there are some missing macros like _SC_<MISS_MICRO>, I found the
> | existing code just return the macro
> | using _POSIX_<MISS_MICRO>, I am wondering where do you guys enforce the
> | limitation in the kernel ?
> | To clarify, let's use _SC_TIMER_MAX as an example, the netbsd code just
> | returns _POSIX_TIMER_MAX in
> | sysconf system call, where can I find the logic to enforce this number
> when
> | user land allocates more times than this value?
> This might sched some light.

This is really helpful, actually, I searched _SC_TIMER_MAX and
but the results cannot indicate where these logics can be found.
One more question, does other _SC_<MISS_MACRO> has the same naming
in the kernel? I mean can I always search MISS_MICRO to find the logic for
this variable?

> | Let me know if there are any concerns.
> No, I will send a separate mail with more comments about the source. Please
> note that with source commits you should also supply unit-tests (see
> for example and also
> manual pages. I can help you with both.
Yes, I agree, I will try to add those, let me know if there are examples or
rules to follow.

> christos

Home | Main Index | Thread Index | Old Index