From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f793b96b3f395d9d X-Google-Attributes: gidfee84,public From: Dave Butenhof Subject: Re: DECthreads : What purpose libmach.so? Date: 1997/09/30 Message-ID: <34310EFA.41C6@zko.dec.com>#1/1 X-Deja-AN: 276752469 References: <342DA20C.A6220C42@math.nus.edu.sg> Organization: Digital Equipment Corporation Newsgroups: comp.unix.osf.osf1 Chan Shih-Ping wrote: > > Can anyone explain what the routines in libmach.so do for > threaded programs. Compiling with cc -pthread pulls > in libpthread.so as well as libmach.so and libexc.so Those are libraries required for the threading environment. > I guess libexc.so is for exceptions but what about > the stuff in libmach.so (the mach kernel??) like > thread_create etc. In particular, yes, libexc provides the standard mechanism for dealing with exceptions. For a lot of reasons, (including, for example, smooth integration with languages like Ada and C++ that support exceptions), POSIX cancellation and pthread_exit are implemented using the native exception mechanism. libmach provides the interfaces to the Mach kernel functions. We use them to create and control kernel threads. In the future we'll be dropping libmach, as we replace the general Mach interfaces with new interfaces more specific to our needs -- but of course it won't hurt to include libmach anyway. /---------------------------[ Dave Butenhof ]--------------------------\ | Digital Equipment Corporation butenhof@zko.dec.com | | 110 Spit Brook Rd ZKO2-3/Q18 http://members.aol.com/drbutenhof | | Nashua NH 03062-2698 http://www.awl.com/cp/butenhof/posix.html | \-----------------[ Better Living Through Concurrency ]----------------/