This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PowerPC: Add functions for shared resources hints


> 	* 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]