Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Oct 1999 07:42:20 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        asmodai@wxs.nl, green@FreeBSD.org
Cc:        eischen@vigrid.com, hackers@FreeBSD.org, jb@FreeBSD.org, nordwick@scam.xcf.berkeley.edu, shocking@prth.pgs.com
Subject:   Re: On pthreads [Was: Re: I was accepted to LokiHack '99 at Atlanta Linux Showcase]
Message-ID:  <199910061142.HAA17064@pcnet1.pcnet.com>

next in thread | raw e-mail | index | archive | help
Jeroen Ruigrok/Asmodai wrote:
> On [19991006 04:02], Brian F. Feldman (green@FreeBSD.org) wrote:
> >What do you all think about
> >http://www.FreeBSD.org/~green/OpenBSD.libc_r.cancel.patch
> >? I isolated the set of commits that added cancelling to OpenBSD's
> >libc_r, and it seems (since they took it from us originally :) it
> >should be relatively simple to port :/
> 
> I knew you were working on importing the OpenBSD pthread_cancel.
> 
> Any idea how much fun it will be to get this into FreeBSD?

Did they make any changes to libc?  Some of our libc routines
make internal calls to cancellable routines and shouldn't be
cancellable in that case.

Here's what POSIX states are cancellable routines:

  Required cancellation points:

    aio_suspend(), close(), creat(), fcntl()*, fsync(),
    mq_receive(), mq_send(), msync(), nanosleep(),
    open(), pause(), pthread_cond_timedwait(),
    pthread_cond_wait(), pthread_join(), pthread_testcancel,
    read(), sem_wait(), sigwaitinfo(), sigsuspend(),
    sigtimedwait(), sigwait(), sleep(), system(),
    tcdrain(), wait(), waitpid(), write().

    * fcntl() when cmd is F_SETLKW

  Cancellation points may also occur while a thread is executing
  the following functions:

    closedir(), ctermid(), fclose(), fcntl()*, fflush(),
    fgetc(), fgets(), fopen(), fprintf(), fputc(),
    fputs(), fread(), freopen(), fscanf(), fseek(),
    ftell(), fwrite(), getc(), getc_unlocked(),
    getchar(), getchar_unlocked(), getcwd(), getgrgid(),
    getgrgid_r(), getgrnam(), getgrnam_r(), getlogin(),
    getlogin_r(), getpwnam(), getpwnam_r(), getpwuid(),
    getpwuid_r(), gets(), lseek(), opendir(), perror(),
    printf(), putc(), putc_unlocked(), putchar(),
    putchar_unlocked(), puts(), readdir(), remove(),
    rename(), rewind(), rewinddir(), scanf(), tmpfile()
    tmpname(), ttyname(), ttyname_r(), ungetc(), unlink().

    * fcntl() for any value of the command argument

I've got some other changes waiting for JB to review.  If
you proceed with this, I'd like to review whatever you come
up with.

Dan Eischen
eischen@vigrid.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910061142.HAA17064>