From owner-freebsd-hackers Sun May 20 10:52:45 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from sharmas.dhs.org (cpe-66-1-147-119.ca.sprintbbd.net [66.1.147.119]) by hub.freebsd.org (Postfix) with ESMTP id 41C9D37B42C for ; Sun, 20 May 2001 10:52:42 -0700 (PDT) (envelope-from arun@sharmas.dhs.org) Received: from OMNI (unknown [192.168.1.100]) by sharmas.dhs.org (Postfix) with SMTP id 87E395DF2F for ; Sun, 20 May 2001 10:48:29 -0700 (PDT) From: "Arun Sharma" To: "Freebsd Hackers" Subject: libc threadsafe ? Date: Sun, 20 May 2001 10:52:21 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I see some changes to -current as of Jan 2001, that attempt to make libc threadsafe without -pthread and _THREAD_SAFE. http://groups.google.com/groups?q=Daniel+Eischen&hl=en&lr=&safe=off&scoring=d&as_drrb=b&as_mind=1&as_minm=1&as_miny=2001&as_maxd=20& as_maxm=1&as_maxy=2001&rnum=4&ic=1&selm=94amg1%242fnu%241%40FreeBSD.csie.NCTU.edu.tw I'm attempting to port IBM's NGPT to freebsd and most of the things seem to be working fine. The following is the C file needed to make it work, apart from some minor work arounds for Makefiles. http://sharmas.dhs.org/~adsharma/pth_native_freebsd.c I'm trying to hunt down a stack corruption that I'm seeing after a sigsetjmp and siglongjmp. It could be due to a bug in NGPT or it could be due to the fact that I'm linking -lc and not -lc_r and -lc is not completely thread safe. The stack in question was malloc'ed and passed as an argument to rfork_thread. My question is, do I need to do anything else (apart from incrementing __isthreaded and providing strong references to locking routines) to get -lc to work in a MT environment ? -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message