Thread: cancellation points list needed!!

  1. #1
    Alessio Stella
    Join Date
    May 2008
    Location
    Italy, Bologna
    Posts
    251

    cancellation points list needed!!

    I have difficulties in finding good documentation of cancellation points among "ordinary" library functions

    I manually noted in the past the following list but it might be incomplete and/or not up to date:
    //CANCELATION POINTS
    /*
    * pthread_cond_wait
    * pthread_cond_timedwait_relative
    * pthread_join
    * sem_wait
    *
    //might be some of the following are ASYNC (not internally DEFERRED). In that case cancellation handlers will run anyway.
    close(2).
    fcntl(2).
    fsync(2).
    lseek(2).
    msync(2).
    nanosleep(2).
    open(2).
    pause(2).
    read(2).
    system(3).
    tcdrain(2).
    wait(2).
    waitpid(2).
    write(2).
    *
    * accept(2)
    * connect(2)
    * recv(2)
    * recvfrom(2).
    * recvmsg(2).
    * send(2).
    * sendmsg(2).
    * sendto(2).


    Could you please suggest a link where to find this documentat. (complete! easy! up to date!)?

    For instance here http://linux.die.net/man/2/accept accept is not mentioned as a cancellation point but i had noted it down! I probably read it somewhere on the internet do not remember where..

    Quite confusing..

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Tricky business. It seems very hard to find a general list of cancellation points.

    I found this, but it's not for Linux.
    http://compute.cnr.berkeley.edu/cgi-...cancellation+5

    By the way, this thread should be in the Linux forum.
    Last edited by CornedBee; 11-27-2008 at 12:34 PM.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3

  4. #4
    Alessio Stella
    Join Date
    May 2008
    Location
    Italy, Bologna
    Posts
    251
    Quote Originally Posted by Codeplug View Post
    There's a list in the "System Interfaces" volume, section 2.9.5.

    http://www.opengroup.org/onlinepubs/...ag_02_09_05_02

    gg
    Interesting thanks
    Is that POSIX specs?
    I guess Linux doesn't necessarily follow 100% of this

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Linux may not necessarily be 100% posix compliant, but the specification is quite clear:
    An implementation shall not introduce cancellation points into any other functions specified in this volume of IEEE Std 1003.1-2001.
    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting linked list please help with CODE
    By scarlet00014 in forum C Programming
    Replies: 3
    Last Post: 09-27-2008, 11:24 PM
  2. Need help sorting a linked list. Beginner
    By scarlet00014 in forum C Programming
    Replies: 1
    Last Post: 09-27-2008, 06:16 PM
  3. help! Placement of nodes in a Linked List
    By lostmyshadow in forum C Programming
    Replies: 6
    Last Post: 12-17-2007, 01:21 PM
  4. Linked List
    By jpipitone in forum C Programming
    Replies: 4
    Last Post: 03-30-2003, 09:27 PM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM