From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,c901133e3f78f6c9 X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-10-31 08:07:31 PST Path: bga.com!news.sprintlink.net!EU.net!uunet!winternet.com!news2.mr.net!mr.net!rohcs1.uhc.com!lochness.uhc.com!probert From: probert@lochness.uhc.com (Paul Roberts) Newsgroups: comp.unix.osf.misc Subject: Re: HELP: Question on DCE Threads Date: 31 Oct 1994 14:37:50 GMT Organization: United HealthCare Corporation Message-ID: <392vfu$12in@rohcs1.uhc.com> References: NNTP-Posting-Host: lochness.uhc.com Pramod Kalapa (android@netcom.com) wrote: : I've just written a simple program using DCE threads (it is my first !). : Basically I want to create 2 threads which call a function to open a file : The thread creation call is as follows : : if((pthread_create(&thread_hdl1, pthread_attr_default, : (pthread_startroutine_t) open_file, : (pthread_addr_t)NULL)) != 0) : { : fprintf(stderr,"%s\n","Unable to create thread1"); : exit(1); : } : where open-file is the function to open the file. The creation routine : returns 0, which I assume is the valid value for a successful creation. : However, the thread doesn't enter the function "open_file". I've stepped : through the code with dbx and it just exits out of main. I've linked : with the thread-safe library libc_r.a : Can someone please e-mail me as to what I might be doing wrong ? : I am using DCE 1.2 threads on AIX 3.2.5 on an IBM PowerPC. : Thanks dbx in AIX is thread-safe and thread-aware. If you do a stop in open_file command and then continue within dbx, you should see it enter your function. The AIX dbx also has a "threads" subcommand where you can observe the threads during execution. -- Paul Roberts e-mail: probert@uhc.com United HealthCare Corporation, MN06-6130 phone: 612-945-6378 P.O. Box 1459, Minneapolis, MN 55440 fax: 612-945-6502