The first patch in this series has been seen before, it optimises for the common "lookup the default huge page size" operation. However this then breaks the gethugepagesizes test as it can no longer manipulate the values read as they are cached in the library.
The second patch implements a new test probe interface which allows partial exportation of interfaces into the main library. These are exposed in the header libhugetlbfs_testprobes.h and are name mangled for export in the main library. The third patch uses this new interface to allow tests to invalidate the huge page size cache in the library through a new test probe interface. Comments? -apw Andy Whitcroft (3): privutils: cache and expose the kernel default page size add a new export type for main library probe points for tests hugetlbfs default page size is cached so expose reset for testing hugeutils.c | 37 +++++++++++++++++++++++++------------ libhugetlbfs_internal.h | 1 + libhugetlbfs_privutils.h | 3 +++ libhugetlbfs_testprobes.h | 39 +++++++++++++++++++++++++++++++++++++++ shm.c | 2 +- tests/gethugepagesizes.c | 4 ++++ tests/hugetests.h | 1 + version.lds | 2 ++ 8 files changed, 76 insertions(+), 13 deletions(-) create mode 100644 libhugetlbfs_testprobes.h ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel