type The cancelability type to set for the calling thread. The following are valid values: PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_ASYNCHRONOUS oldtype Returns the previous cancelability type.