From owner-freebsd-arch@freebsd.org Tue Feb 16 16:17:57 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20DF6AA9C0C for ; Tue, 16 Feb 2016 16:17:57 +0000 (UTC) (envelope-from martin@lispworks.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0E9E8FD3 for ; Tue, 16 Feb 2016 16:17:57 +0000 (UTC) (envelope-from martin@lispworks.com) Received: by mailman.ysv.freebsd.org (Postfix) id 01C19AA9C0A; Tue, 16 Feb 2016 16:17:57 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 013CFAA9C09; Tue, 16 Feb 2016 16:17:57 +0000 (UTC) (envelope-from martin@lispworks.com) Received: from lwfs1-cam.cam.lispworks.com (mail.lispworks.com [46.17.166.21]) by mx1.freebsd.org (Postfix) with ESMTP id 9BB3AFD1; Tue, 16 Feb 2016 16:17:55 +0000 (UTC) (envelope-from martin@lispworks.com) Received: from higson.cam.lispworks.com (higson.cam.lispworks.com [192.168.1.7]) by lwfs1-cam.cam.lispworks.com (8.14.9/8.14.9) with ESMTP id u1GGHkx5039283; Tue, 16 Feb 2016 16:17:46 GMT (envelope-from martin@lispworks.com) Received: from higson.cam.lispworks.com (localhost.localdomain [127.0.0.1]) by higson.cam.lispworks.com (8.14.4) id u1GGHkPF023638; Tue, 16 Feb 2016 16:17:46 GMT Received: (from martin@localhost) by higson.cam.lispworks.com (8.14.4/8.14.4/Submit) id u1GGHkil023634; Tue, 16 Feb 2016 16:17:46 GMT Date: Tue, 16 Feb 2016 16:17:46 GMT Message-Id: <201602161617.u1GGHkil023634@higson.cam.lispworks.com> From: Martin Simmons To: Konstantin Belousov CC: vangyzen@FreeBSD.org, threads@FreeBSD.org, arch@FreeBSD.org In-reply-to: <20160215175621.GU91220@kib.kiev.ua> (message from Konstantin Belousov on Mon, 15 Feb 2016 19:56:21 +0200) Subject: Re: libthr shared locks References: <20151223172528.GT3625@kib.kiev.ua> <56BE69B8.9020808@FreeBSD.org> <20160213143815.GB91220@kib.kiev.ua> <201602151417.u1FEHKwL003392@higson.cam.lispworks.com> <20160215144410.GT91220@kib.kiev.ua> <201602151735.u1FHZXKV006190@higson.cam.lispworks.com> <20160215175621.GU91220@kib.kiev.ua> X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2016 16:17:57 -0000 >>>>> On Mon, 15 Feb 2016 19:56:21 +0200, Konstantin Belousov said: > > One process which executed pthread_barrier_init(), performed what you > proposed. What should do the pthread_barrier_wait() call in another > process, which shares the 'barrier' with the first process, but does > not share the whole address space ? After your pthread_barrier_init() > executed, barrier contains the address of the object (off-page) in the > other address space, for that process. Ah, sorry, I understand now (the init functions are called before any sharing). How should the destroy functions be used by the processes? I.e. should only the "last" process call destroy or can every process call it?