From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6474 invoked by alias); 13 Sep 2013 13:11:43 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 6460 invoked by uid 89); 13 Sep 2013 13:11:42 -0000 Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 13 Sep 2013 13:11:42 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,FREEMAIL_FROM autolearn=ham version=3.3.2 X-HELO: mail-pa0-f46.google.com Received: by mail-pa0-f46.google.com with SMTP id fa1so2511686pad.19 for ; Fri, 13 Sep 2013 06:11:40 -0700 (PDT) X-Received: by 10.68.178.227 with SMTP id db3mr1582724pbc.202.1379077900380; Fri, 13 Sep 2013 06:11:40 -0700 (PDT) Received: from msticlxl57.ims.intel.com ([192.55.54.42]) by mx.google.com with ESMTPSA id om2sm11675069pbc.30.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:39 -0700 (PDT) Date: Fri, 13 Sep 2013 13:11:00 -0000 From: "Michael V. Zolotukhin" To: Jakub Jelinek Cc: Kirill Yukhin , Richard Henderson , gcc@gcc.gnu.org, triegel@redhat.com Subject: Re: [RFC] Offloading Support in libgomp Message-ID: <20130913131109.GD30181@msticlxl57.ims.intel.com> References: <20130827113956.GH21876@tucnak.zalov.cz> <20130827115538.GB4093@msticlxl57.ims.intel.com> <20130828093428.GO21876@tucnak.zalov.cz> <20130910150126.GA2059@msticlxl57.ims.intel.com> <20130910151453.GB1817@tucnak.redhat.com> <20130910153053.GB2059@msticlxl57.ims.intel.com> <20130910153624.GD1817@tucnak.redhat.com> <20130910153810.GC2059@msticlxl57.ims.intel.com> <20130913112930.GC30181@msticlxl57.ims.intel.com> <20130913123614.GB1817@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130913123614.GB1817@tucnak.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00121.txt.bz2 > But I doubt dirent.h is portable to all targets we support, so I believe it > needs another configure test, and perhaps we want to define some macro > whether we actually support offloading at all (HAVE_DLFCN_H would be one > precondition, HAVE_DIRENT_H (with opendir etc.) another one (for this the > question is if we are building libgomp with LFS flags also, i.e. opendir64 > etc. if available) another requirement we have is that sizeof (void *) == > sizeof (uintptr_t), etc. That sounds reasonable, I'll do it. > I'm afraid strnlen isn't sufficiently portable. Why don't you just use > strlen? strnlen was used as it's more secure than strlen (on non-constant strings). However, maybe that's not so critical in this place. And anyway, we could use strnlen when it's available and strlen otherwise. > resolve_device should be changed to return struct gomp_device_descr * > (or NULL for host fallback), and this pthread_once done inside of > resolve_device, not in all the callers. > Aliasing violation, don't do that. Will fix, thanks. > FYI, I'm attaching a WIP patch with the splay tree stuff. Thanks, I'll take a look. By the way, isn't it better to move splay-tree implementation to a separate file? Michael > Jakub