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 v2] [BZ #10283] localedef: align fixed maps to SHMLBA


On Tuesday 28 May 2013 15:40:42 Roland McGrath wrote:
> The fact that SHMLBA is the right size for this is a Linuxism.  It should
> not be used directly in generic libc code.  Instead, add a private sysdeps/
> header to define a macro or function that yields this larger-than-page size
> and explains what uses need to use this size.  If it's then the most
> sensible thing for a machine-independent linux/ implementation of this
> header to use SHMLBA, then fine.

i agree with the distinction you make here.  since SHMLBA is fairly "portable" 
in the practical sense, how about something like this.  any random target 
which deviates can drop their own mman-internal.h header into their private 
dir.
-mike

--- /dev/null
+++ b/include/bits/mman-internal.h
@@ -0,0 +1,2 @@
+#include <sys/shm.h>
+#define MAP_FIXED_ALIGNMENT SHMLBA
--- /dev/null
+++ b/include/bits/mman.h
@@ -0,0 +1,2 @@
+#include_next <bits/mman.h>
+#include <bits/mman-internal.h>

Attachment: signature.asc
Description: This is a digitally signed message part.


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