This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Why is defined PPC_ISYNC defined as "sync;isync"
- From: "Ryan Arnold" <ryan dot arnold at gmail dot com>
- To: "Sean P Curry" <spcurry5 at linux dot vnet dot ibm dot com>
- Cc: libc-help at sourceware dot org
- Date: Mon, 8 Dec 2008 09:58:23 -0600
- Subject: Re: Why is defined PPC_ISYNC defined as "sync;isync"
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=RJwyhFZPjXeUQ6+gN9NXbOknjvlYChiZpmjFaTu7/80=; b=VUagDkY9ceYhexaf9EI8Zbs/bWF/hwnkGzQmURr7Kv0XgrHUehYdGE/lT8MApHzzIH RQ0i8kUZyRSzzTm32Eix2Eek1R/k4Ji7l/nlDG7KCTcDx6YYpYxRPhnIh1GrZQvTehHE 8puqxlkIDbpIZAvCjDx7+D+N8qAM3LA/Th9MU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=WxnhwZxeC6lZL+vu0XFARWPr/jkV7An1KNNe3JfmgFQ3uac5OP+GijlCnRm7ewGI8V v+lu+970IviTpnW8ANl45sKXZMOb77PxjNzlIK2QaRhd93Ub8rbx/Aw94/UTCZJebtPY fuPd3B0gqIVZ5BTAarXGdcgls6yq9b36w9p/g=
- References: <1228707781.18436.9.camel@spcurry-laptop.beaverton.ibm.com>
On Sun, Dec 7, 2008 at 9:43 PM, Sean P Curry
<spcurry5@linux.vnet.ibm.com> wrote:
> Can anyone tell me why the macro PPC_ISYNC (located in
> libc/sysdeps/powerpc/powerpc[32/64]/dl-machine.c) is defined as: asm
> volatile("sync; isync"...) ?? (why is the "sync" instruction present
> before the "isync")
Hi Sean,
'sync' is a data-cache synchronization instruction, i.e. a memory
barrier that synchronizes loads and stores.
'isync' is a context synchronization instruction. It guarantees that
all instructions prior to the isync are completed before the isync
completes.
They're coupled together because isync may complete before storage
access associated with instructions preceding the isync instruction
have been performed and we don't want that, hence we need to perform a
sync as well.
Ryan