Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 17 Jun 2002 00:02:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 17 Jun 2002 00:02:23 -0400 Received: from gateway-1237.mvista.com ([12.44.186.158]:63216 "EHLO hermes.mvista.com") by vger.kernel.org with ESMTP id ; Mon, 17 Jun 2002 00:02:22 -0400 Subject: Re: [patch] 2.4.19-pre10-ac2: O(1) scheduler merge, -A3. From: Robert Love To: Ingo Molnar Cc: Alan Cox , "David S. Miller" , linux-kernel@vger.kernel.org, Linus Torvalds In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.7 Date: 16 Jun 2002 21:02:08 -0700 Message-Id: <1024286528.924.52.camel@sinai> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 758 Lines: 28 On Sun, 2002-06-16 at 20:49, Ingo Molnar wrote: smlinkage long sys_sched_yield(void) > { > - runqueue_t *rq; > - prio_array_t *array; > - > - rq = rq_lock(rq); > + runqueue_t *rq = rq_lock(rq); > + prio_array_t *array = current->array; Question. I have always wondered what the C rules are here... is rq_lock guaranteed to be evaluated before current->array? I.e., is the above synonymous with: runqueue_t *rq; prio_array_t *array; rq = rq_lock(rq); array = current->array; ...guaranteed? Robert Love - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/