From owner-freebsd-current@FreeBSD.ORG Mon Apr 6 08:27:36 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90468106566C for ; Mon, 6 Apr 2009 08:27:36 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 58E028FC17 for ; Mon, 6 Apr 2009 08:27:36 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 4AF11730A1; Mon, 6 Apr 2009 10:32:38 +0200 (CEST) Date: Mon, 6 Apr 2009 10:32:38 +0200 From: Luigi Rizzo To: current@freebsd.org Message-ID: <20090406083238.GB3358@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: missing atomic_exchg_*() in the atomic.h API ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2009 08:27:37 -0000 while looking at the functions in atomic.h i noticed that there seems to be no atomic_exchg_*() in the API, though this is a supported function in most/all supported archiectures, and a useful function. We do have atomic_readandclear() which uses the same underlying CPU instruction. Again, any objection if i add it ? cheers luigi