This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC: Add functions for shared resources hints
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Edjunior Barbosa Machado <emachado at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, rsa at us dot ibm dot com
- Date: Tue, 27 Nov 2012 09:31:17 -0800 (PST)
- Subject: Re: [PATCH] PowerPC: Add functions for shared resources hints
- References: <1353993591-3730-1-git-send-email-emachado@linux.vnet.ibm.com>
> * sysdeps/powerpc/Makefile: Add test-shared-resources.c.
This should read:
* sysdeps/powerpc/Makefile [$(subdir) = misc] (tests):
Add test-shared-resources.
> * sysdeps/powerpc/sys/platform/ppc.h: Add __ppc_yield(),
> __ppc_mdoio() and __ppc_mdoom().
() is not part of a function's name.
Just use the name in comments and log entries.
> +The following functions provide hints about the usage of resources that are
> +shared with other processors. They can be used, for example, if a program
> +waiting on a lock intends to divert the shared resources to be used by other
> +processors. More information is available in @cite{Power ISA 2.06b - Book II -
> +Section 3.2}.
Two spaces between sentences.
> + __asm__ volatile ("or 27,27,27\n");
No trailing \n.
> +static int
> +do_test (void)
> +{
> + __ppc_yield ();
> + __ppc_mdoio ();
> + __ppc_mdoom ();
> + return 0;
> +}
I don't understand the point of this test.
It doesn't actually verify anything but that it compiles.