From owner-freebsd-hackers Wed Oct 7 06:00:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA13622 for freebsd-hackers-outgoing; Wed, 7 Oct 1998 06:00:59 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from fsfw.freesoft.hu ([195.228.127.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA13608 for ; Wed, 7 Oct 1998 06:00:55 -0700 (PDT) (envelope-from dbeck@freesoft.hu) Received: (from postmaster@localhost) by fsfw.freesoft.hu (8.7.5/8.7.3) id PAA02305 for ; Wed, 7 Oct 1998 15:00:53 +0200 X-Authentication-Warning: fsfw.freesoft.hu: postmaster set sender to using -f Received: from aviion.freesoft.hu(193.68.58.1) by fsfw.freesoft.hu via smap (V2.0beta) id xma002303; Wed, 7 Oct 98 15:00:47 +0200 Message-Id: <013401bdf1f2$96fc2ad0$963a44c1@dbeck.freesoft.hu> From: "David Beck" To: Subject: pthreads and semctl problem Date: Wed, 7 Oct 1998 15:01:22 +0200 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-Msmail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-Mimeole: Produced By Microsoft MimeOLE V4.72.2106.4 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi All, This is the first time I post to this list. Big hello to everyone :) I started to port an application from DEC Unix to FreeBSD and an unexpected problem cropped out. The app runs on 3 threads and uses system V semaphores for synchronizing access to a shared memory block between unrelated processes. (It communicates with unrelated processes using that shared memory block.) There are a couple of other reasons for why I couldn't use pthread mutexes in this case. The problem is I found that when I block one thread with the semop call, all the other threads will be blocked. Why ? Is it a problem in the C library or the kernel ? I compiled the program with the -pthread flag. Maybe I missed some other flags or switches ? The same code works under DEC and Linux :( Any ideas ? Cheers, David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message