From owner-freebsd-ports@FreeBSD.ORG Wed Apr 23 13:21:10 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19D299B; Wed, 23 Apr 2014 13:21:10 +0000 (UTC) Received: from mail-yh0-x233.google.com (mail-yh0-x233.google.com [IPv6:2607:f8b0:4002:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B263715C4; Wed, 23 Apr 2014 13:21:09 +0000 (UTC) Received: by mail-yh0-f51.google.com with SMTP id f10so797958yha.38 for ; Wed, 23 Apr 2014 06:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3yebjPsgX5iwHqSeK11CxzGVeU3GVVN8NoYcLd2dlQM=; b=KkDqPPDyrkmShx8MeE/eslNwQ2Hh3NNgv9DP9POoiXGQsiidmGxfwvLOv4gRsICFtV kdfzk2eEBUg1vkw/K2le9QcQPE3FXs5vVd2ZrGkZ8ZfZqQtDxlKrHQVp0lJzq1aGDncg bSiuOWo2r9TuZTOEModARKUnTVkNX/FwxSGz5qnquXJXJkZiOqpu5cetE1buax0+GLqx asFr4SjlZdYUzyjMx9WXc7PymDKwHNdI+Jtlu9fHjYP4sZdnxq0iSHTUoZPM6KaZFPFd RBwDjHCNuhUIiF5LzQesq3tWTvgLYY7Dai6p94Std9/AThCivGg3TGsMBFOWFrQoKllg tRuA== MIME-Version: 1.0 X-Received: by 10.236.134.140 with SMTP id s12mr10774053yhi.138.1398259268906; Wed, 23 Apr 2014 06:21:08 -0700 (PDT) Received: by 10.170.130.79 with HTTP; Wed, 23 Apr 2014 06:21:08 -0700 (PDT) In-Reply-To: <20140423065824.GE63561@ivaldir.etoilebsd.net> References: <20140420200534.72226779@nonamehost.local> <20140423065824.GE63561@ivaldir.etoilebsd.net> Date: Wed, 23 Apr 2014 06:21:08 -0700 Message-ID: Subject: Re: [CFT] x11-servers/xorg-server with initial (GCD) Grand Central Dispatch support From: Neil Schroeder To: Baptiste Daroussin Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: Ivan Klymenko , "ports@freebsd.org" , "x11@freebsd.org" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2014 13:21:10 -0000 Yes you can use callbacks and delegates. Blocks are much more elegant - they will handle the context and alloc and derefrencing and a lot of just ugly moving of data. A block wrapped API is amazing - you need to define a block one time per function - not per call like a callback - and you're done. So much less code. Callbacks will be faster - although blocks may be optimized enough now to be materially the same. I would do a little testing. Will libdispatch itself even build in those older compiler environments ? I haven't looked. On Tuesday, April 22, 2014, Baptiste Daroussin wrote: > On Sun, Apr 20, 2014 at 08:05:34PM +0300, Ivan Klymenko wrote: > > Hi all. > > > > You are tired of frequent friezes xorg server? > > Are you bored messages in /var/log/Xorg.0.log: > > " > > ... > > [mi] EQ overflowing. Additional events will be discarded until existing > events are processed. > > ... > > " > > ? > > > > :) > > > > Then you here! :) > > > > Patch attached :) > > > > If you like, we can continue to develop this area. > > > > Thanks > > > Thank you for those patches, imho that is something we really do need. I > would > just have a couple of side notes: > Wouldn't it be possible to use callbacks in the dispatch call rather than > blocks? that will make the patch work on FreeBSD 8, 9, 10 and head with > clang > AND gcc, which will greatly improves the chances to see those patch well > tested > and used enough to finally be incorporated in the ports. > > regards, > Bapt >