lkml.org 
[lkml]   [2003]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Who changed /proc/<pid>/ in 2.6.0-test5-bk9?
Date
In article <3F846183.9010205@redhat.com>,
Ulrich Drepper <drepper@redhat.com> wrote:

| The kernel thread functionality is not used 1-to-1 in the userlevel
| interfaces of the pthread library. One very specific combination of all
| the CLONE_* flags is used in libpthread. Other users of the kernel
| might use other combinations and they won't implement pthreads. That
| is perfectly fine and if it fits your bill, do it. But none of this
| ever has any influence on the pthread interface. The properties like
| sharing of file descriptors are guaranteed.

I confess that my first reaction to this topic was that I could add an
attribute when starting a thread, and then use existing code (pthreads)
and just take advantage of the non-fd-sharing.

Pseudo code: (some of the if's are clearly ifdef)

if linux add_noshare_to_attributes
for (;;) {
fd = listen();
start_thread(fd)
if linux clode fd
}
Clearly that isn't what's needed, I would probably define a
start_service_and_close_fd_ifUcan macro/procedure. When this is stable
and 2.6 is closer to production quality I will probably modify a few
applications to see what benefits might be available.
--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [from the cache]
©2003-2011 Jasper Spaans