From owner-cvs-all Mon Oct 8 23:17: 0 2001 Delivered-To: cvs-all@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 04B9C37B406; Mon, 8 Oct 2001 23:16:54 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f996GpE10358; Mon, 8 Oct 2001 23:16:51 -0700 (PDT) (envelope-from dillon) Date: Mon, 8 Oct 2001 23:16:51 -0700 (PDT) From: Matt Dillon Message-Id: <200110090616.f996GpE10358@earth.backplane.com> To: Poul-Henning Kamp Cc: John Baldwin , cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG Subject: Re: cvs commit: src/sys/i386/include atomic.h References: <66596.1002607759@critter.freebsd.dk> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG : :In message <200110090434.f994Yam09790@earth.backplane.com>, Matt Dillon writes: :> I don't think it's a good idea to expose the atomic_*() ops or any other :> SMP mechanisms in the kernel to userland. : :If we are going to be serious about threads, we need to expose some kind :of atomic ops to userland. : :I can't see why they could not be the same as we use in the kernel... : :-- :Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 How platform independant do you want to be? If you want userland atomic ops, they should be entirely separate from the kernel and almost certainly use a different API. Frankly I think having userland atomic ops at all is a terrible idea, especially after all the hell people doing the alpha and IA64 ports went through (are going through?) with the current kernel atomic ops. It is far better to have *high* level userland operations, like userland mutexes (which BTW should be entirely independant of kernel mutexes), and not expose low level so-called atomic ops to userland at all. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message