From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,63e84d65d4999f24 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-02-10 06:15:23 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!nntp-relay.ihug.net!ihug.co.nz!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail Newsgroups: comp.unix.tru64 Subject: Re: How to create kernel-level threads in Tru64 5.1? References: From: duane@and.zk3.dec.com (Andrew Duane USG) Message-ID: Date: Mon, 10 Feb 2003 14:17:43 GMT NNTP-Posting-Host: 16.140.64.3 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 1044886663 16.140.64.3 (Mon, 10 Feb 2003 06:17:43 PST) NNTP-Posting-Date: Mon, 10 Feb 2003 06:17:43 PST Organization: Hewlett-Packard Company Xref: archiver1.google.com comp.unix.tru64:9517 In article "Ioannis E. Venetis" writes: > I am a relative new user of an Alpha machine with Tru64 Unix 5.1. I am > developing a user-level thread library and I need to create > kernel-level threads that will be used as execution vehicles for the > user-level threads. Under Linux I am using the clone() system call to > do that. I would like to ask if there is a similar interface in Tru64 > Unix. I have seen a piece of software that uses the thread_create(), > thread_set_state() etc. interface from the libmach.a library and I > also found the prorotypes of kernel_thread(), kernel_thread_w_arg() > etc. in /usr/sys/include/kern/threads.h. My problem is that I cannot > find any documentation about these functions, I don't know if they are > actually supported or if they are just low-level hacks that might work > or not in future releases. These prototypes are in fact kernel routines, and have no bearing on any user level code you might be writing. Others have already spoken to POSIX threads and different flavors. The kernel threads are created for you automatically as needed, there is no need for you to do anything about them. At a "high" level, there are two kinds of threads: one-on-one, where each user thread has a kernel thread and scheduling is done by the kernel, and NXM (n-by-m), where several user threads share a kernel thread, and scheduling is done by the user at user level. -- Andrew L. Duane (JOT-7) duane@zk3.dec.com HP/Compaq Corporation Andrew.Duane@compaq.com 110 Spit Brook Road Andrew.Duane@hp.com M/S ZKO3-3/U14 Nashua, NH 03062-2698 (603)-884-1294