diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-31 13:20:42 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-31 13:20:42 (GMT) |
commit | 0ac0358a80e98142e1039fb1bc021f7a20744332 (patch) | |
tree | cb3586ae9e90a3c3b0e5f242f25fafa324c3e9f1 /test/cache_common.c | |
parent | 972a1bba5dab768d46282c9205c3670a3a6c80e7 (diff) | |
download | hdf5-0ac0358a80e98142e1039fb1bc021f7a20744332.zip hdf5-0ac0358a80e98142e1039fb1bc021f7a20744332.tar.gz hdf5-0ac0358a80e98142e1039fb1bc021f7a20744332.tar.bz2 |
[svn-r16630] Description:
Add 'notify' callback to metadata cache clients, so that they can be
aware when the cache has taken/will take certain actions. Notifications are
urrently limited to when an entry has successfully entered the cache (via an
insertion or a load from the file) and when an entry is about to be evicted
from the cache.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.6 (amazon) in debug mode
Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'test/cache_common.c')
-rw-r--r-- | test/cache_common.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/cache_common.c b/test/cache_common.c index c0ec7c8..6c63274 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -155,6 +155,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = (H5C_flush_func_t)pico_flush, (H5C_dest_func_t)pico_dest, (H5C_clear_func_t)pico_clear, + (H5C_notify_func_t)NULL, (H5C_size_func_t)pico_size }, { @@ -163,6 +164,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = (H5C_flush_func_t)nano_flush, (H5C_dest_func_t)nano_dest, (H5C_clear_func_t)nano_clear, + (H5C_notify_func_t)NULL, (H5C_size_func_t)nano_size }, { @@ -171,6 +173,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = (H5C_flush_func_t)micro_flush, (H5C_dest_func_t)micro_dest, (H5C_clear_func_t)micro_clear, + (H5C_notify_func_t)NULL, (H5C_size_func_t)micro_size }, { @@ -179,6 +182,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = (H5C_flush_func_t)tiny_flush, (H5C_dest_func_t)tiny_dest, (H5C_clear_func_t)tiny_clear, + (H5C_notify_func_t)NULL, (H5C_size_func_t)tiny_size }, { @@ -187,6 +191,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = (H5C_flush_func_t)small_flush, (H5C_dest_func_t)small_dest, (H5C_clear_func_t)small_clear, + (H5C_notify_func_t)NULL, (H5C_size_func_t)small_size }, { @@ -195,6 +200,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = (H5C_flush_func_t)medium_flush, (H5C_dest_func_t)medium_dest, (H5C_clear_func_t)medium_clear, + (H5C_notify_func_t)NULL, (H5C_size_func_t)medium_size }, { @@ -203,6 +209,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = (H5C_flush_func_t)large_flush, (H5C_dest_func_t)large_dest, (H5C_clear_func_t)large_clear, + (H5C_notify_func_t)NULL, (H5C_size_func_t)large_size }, { @@ -211,6 +218,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = (H5C_flush_func_t)huge_flush, (H5C_dest_func_t)huge_dest, (H5C_clear_func_t)huge_clear, + (H5C_notify_func_t)NULL, (H5C_size_func_t)huge_size }, { @@ -219,6 +227,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = (H5C_flush_func_t)monster_flush, (H5C_dest_func_t)monster_dest, (H5C_clear_func_t)monster_clear, + (H5C_notify_func_t)NULL, (H5C_size_func_t)monster_size }, { @@ -227,6 +236,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = (H5C_flush_func_t)variable_flush, (H5C_dest_func_t)variable_dest, (H5C_clear_func_t)variable_clear, + (H5C_notify_func_t)NULL, (H5C_size_func_t)variable_size } }; @@ -2646,7 +2656,7 @@ insert_entry(H5C_t * cache_ptr, entry_ptr->is_dirty = TRUE; result = H5C_insert_entry(NULL, -1, -1, cache_ptr, &(types[type]), - entry_ptr->addr, (void *)entry_ptr, flags); + entry_ptr->addr, (void *)entry_ptr, flags, NULL); if ( ( result < 0 ) || ( entry_ptr->header.is_protected ) || |