BSD

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • rthreads

    6 answers - 1654 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    i just committed the current rthreads code. this is a replacement for the
    current userland thread library, libpthread. the kernel is made thread
    aware and some syscalls are added to facilitate the userland library.
    most of the kernel code is currently only enabled if you add RTHREADS to
    the config file. it will probably remain this while for some time.
    the userland library implements a subset of the pthreads API. it is
    binary compatible, so it is possible to switch to it on the fly.
    currently, only i386 and amd64 are supported. to add support for a new
    arch, copy _atomic_lock from libpthread and write rfork_thread.
    the new syscalls need to be stubbed into libc, there is a diff at the end
    of this email.
    there is still a lot of work to do. signals are hard. there are
    functions missing from the library. but some quirks aside, i have
    been using this code since may without incident.
    quite a few more details about how everything fits together can be found
    in the paper linked from events.html.
    Index: Makefile.inc
    RCS file: /,v
    retrieving revision 1.75
    diff -u -r1.75 Makefile.inc
    Makefile.inc2005/11/29 21:29:151.75
    Makefile.inc2005/12/03 18:26:10
    @@ -57,7 +57,8 @@
    sigaltstack.o socket.o socketpair.o stat.o statfs.o swapctl.o \
    symlink.o sync.o sysarch.o umask.o unlink.o unmount.o \
    utimes.o vadvise.o wait4.o write.o writev.o xfspioctl.o __semctl.o \
    -__syscall.o __sysctl.o
    +__syscall.o __sysctl.o sched_yield.o getthrid.o thrsleep.o thrwakeup.o \
    +threxit.o thrsigdivert.o
    GASM=${ASM:.o=.go}
    PASM=${ASM:.o=.po}
  • No.1 | | 1285 bytes | |

    * Ted Unangst [2005-12-03]:
    i just committed the current rthreads code. this is a replacement for

    If you switch to rthreads and still want to compile ports with
    USE_SYSTRACE, you need to build a systrace with -DRTHREADS and apply
    this diff.

    Index:

    RCS file: /,v
    retrieving revision 1.16
    diff -u -r1.16 systrace.filter
    9 Jul 2005 07:29:01 -00001.16
    4 Dec 2005 09:42:31 -0000
    @@ -67,6 +67,7 @@
    native-getsid: permit
    native-getsockname: permit
    native-getsockopt: permit
    +native-getthrid: permit
    native-gettimeofday: permit
    native-getuid: permit
    native-ioctl: permit
    @@ -101,6 +102,8 @@
    native-recvfrom: permit
    native-recvmsg: permit
    native-rename: permit
    +native-rfork: permit
    +native-sched_yield: permit
    native-select: permit
    native-sendmsg: permit
    native-sendto: permit
    @@ -136,6 +139,10 @@
    native-symlink: filename match "/<non-existent filename>: *" then deny[enoent]
    native-symlink: string eq "" and filename eq "" then deny[enoent]
    native-sync: permit
    +native-threxit: permit
    +native-thrsigdivert: permit
    +native-thrsleep: permit
    +native-thrwakeup: permit
    native-umask: permit
    native-utimes: permit
    native-vfork: permit
  • No.2 | | 1346 bytes | |

    Ted Unangst wrote:

    i just committed the current rthreads code. this is a replacement for the
    current userland thread library, libpthread. the kernel is made thread
    aware and some syscalls are added to facilitate the userland library.

    most of the kernel code is currently only enabled if you add RTHREADS to
    the config file. it will probably remain this while for some time.

    the userland library implements a subset of the pthreads API. it is
    binary compatible, so it is possible to switch to it on the fly.
    currently, only i386 and amd64 are supported. to add support for a new
    arch, copy _atomic_lock from libpthread and write rfork_thread.

    the new syscalls need to be stubbed into libc, there is a diff at the end
    of this email.

    there is still a lot of work to do. signals are hard. there are
    functions missing from the library. but some quirks aside, i have
    been using this code since may without incident.

    quite a few more details about how everything fits together can be found
    in the paper linked from events.html.

    Your paper mentions NetBSD SA, FreeBSD KSE and Linux NPTL (only in
    reference).

    Did you look at FreeBSD libthr? It was substantially rewritten recently
    by David Xu. Can you borrow from that code?

    Cheers,

    Dries
  • No.3 | | 266 bytes | |

    Dries Schellekens wrote:
    Did you look at FreeBSD libthr? It was substantially rewritten recently
    by David Xu. Can you borrow from that code?
    Dragonfly BSD apparently is also adapting this library to their LWKT.
    Cheers,
    Dries
  • No.4 | | 271 bytes | |

    12/5/05, Dries Schellekens <gwyllion (AT) ulyssis (DOT) orgwrote:
    Did you look at FreeBSD libthr? It was substantially rewritten recently
    by David Xu. Can you borrow from that code?
    i'm aware of it, but haven't looked at it recently.
  • No.5 | | 202 bytes | |

    Hi . i was wandering if the current implemntation of threads use the
    Test and Set cpu instruction to implement semaphores. if not would
    there be a point in doing so?
    thanks :)
    DsP
  • No.6 | | 505 bytes | |

    Hello!

    Mon, Dec 19, 2005 at 05:01:47PM +0200, ramrunner wrote:
    >Hi . i was wandering if the current implemntation of threads use the
    >Test and Set cpu instruction to implement semaphores. if not would
    >there be a point in doing so?


    How about taking a look in the source?

    Exactly this is done in /
    and similar files for other archs.

    >thanks :)
    >DsP


    Kind regards,

    Hannah.

Re: rthreads


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "BSD"

EMSDN.COM