From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 16 12:13:24 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0CC516A4E1; Mon, 16 Oct 2006 12:13:24 +0000 (UTC) (envelope-from marcov@stack.nl) Received: from mx1.stack.nl (meestal.stack.nl [131.155.140.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C5EE43D81; Mon, 16 Oct 2006 12:09:16 +0000 (GMT) (envelope-from marcov@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id EEE044B26D; Mon, 16 Oct 2006 14:08:59 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 816) id E146C2287D; Mon, 16 Oct 2006 14:08:59 +0200 (CEST) In-Reply-To: <200610150326.03279.ekkehard.morgenstern@onlinehome.de> To: Ekkehard Morgenstern Date: Mon, 16 Oct 2006 14:08:59 +0200 (CEST) X-Mailer: ELM [version 2.4ME+ PL123] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Message-Id: <20061016120859.E146C2287D@snail.stack.nl> From: marcov@stack.nl (Marco van de Voort) Cc: freebsd-hackers@freebsd.org, David Xu Subject: Re: Threading system calls (int 80h) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2006 12:13:24 -0000 > > On Sunday 15 October 2006 01:32, David Xu wrote: > > You are going to be unable to use libc if you create raw thread in your > > program, libc uses pthread APIs, if you create a raw thread, your > > program will crash if you use any libc function which needs pthread > > interface. > > I don't want to link to libc. So, how do I create a raw thread? (digging deep into memory) Have a look how the linuxator emulates the clone() syscall with (IIRC) rfork. A limited route, but iirc it works. The Free Pascal 1.0 compiler (2000) uses this for a form of threading (4.x though, and 2.0+ uses pthreads)