diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-05-29 15:07:55 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-05-29 15:07:55 (GMT) |
commit | e69e970a1c71621c39a5f5fa656a185948ed1df8 (patch) | |
tree | 6d62761aa80d47e1713786bdeadabed02cc3c8f0 /src/H5FDlog.c | |
parent | 0ba943194ec2c8b74bbfd6531ee7a9b110803974 (diff) | |
download | hdf5-e69e970a1c71621c39a5f5fa656a185948ed1df8.zip hdf5-e69e970a1c71621c39a5f5fa656a185948ed1df8.tar.gz hdf5-e69e970a1c71621c39a5f5fa656a185948ed1df8.tar.bz2 |
[svn-r5471] Purpose:
Code cleanup
Description:
Broke the FUNC_ENTER macro into several macros, with more specialized
uses (which followup mail will describe). This was designed to move
most/all of the checks which could be done at compile time to that point,
instead of needlessly performing them (over & over :-) at run-time.
This reduces the library's size (and thus staticly linked binaries) and
has a minor speedup effect also.
Platforms tested:
IRIX64 6.5 (modi4) with parallel & FORTRAN enabled, and additional testing
on FreeBSD and Solaris immediately after the checkin.
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r-- | src/H5FDlog.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c index c7279cb..563f4f0 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -244,7 +244,7 @@ static int interface_initialize_g = 0; hid_t H5FD_log_init(void) { - FUNC_ENTER(H5FD_log_init, FAIL); + FUNC_ENTER_NOAPI(H5FD_log_init, FAIL); if (H5I_VFL!=H5Iget_type(H5FD_LOG_g)) H5FD_LOG_g = H5FDregister(&H5FD_log_g); @@ -281,7 +281,7 @@ H5Pset_fapl_log(hid_t fapl_id, char *logfile, int verbosity) H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value=FAIL; - FUNC_ENTER(H5Pset_fapl_log, FAIL); + FUNC_ENTER_API(H5Pset_fapl_log, FAIL); H5TRACE3("e","isIs",fapl_id,logfile,verbosity); if(TRUE!=H5P_isa_class(fapl_id,H5P_FILE_ACCESS) || NULL == (plist = H5I_object(fapl_id))) @@ -327,7 +327,7 @@ H5Pset_fapl_log(hid_t fapl_id, char *logfile, unsigned flags, size_t buf_size) H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value=FAIL; - FUNC_ENTER(H5Pset_fapl_log, FAIL); + FUNC_ENTER_API(H5Pset_fapl_log, FAIL); H5TRACE4("e","isIuz",fapl_id,logfile,flags,buf_size); if(TRUE!=H5P_isa_class(fapl_id,H5P_FILE_ACCESS) || NULL == (plist = H5I_object(fapl_id))) @@ -367,7 +367,7 @@ H5FD_log_fapl_get(H5FD_t *_file) { H5FD_log_t *file = (H5FD_log_t*)_file; - FUNC_ENTER(H5FD_log_fapl_get, NULL); + FUNC_ENTER_NOAPI(H5FD_log_fapl_get, NULL); FUNC_LEAVE(H5FD_log_fapl_copy(&(file->fa))); } /* end H5FD_log_fapl_get() */ @@ -395,7 +395,7 @@ H5FD_log_fapl_copy(const void *_old_fa) const H5FD_log_fapl_t *old_fa = (const H5FD_log_fapl_t*)_old_fa; H5FD_log_fapl_t *new_fa = H5MM_malloc(sizeof(H5FD_log_fapl_t)); - FUNC_ENTER(H5FD_log_fapl_copy, NULL); + FUNC_ENTER_NOAPI(H5FD_log_fapl_copy, NULL); assert(new_fa); @@ -433,7 +433,7 @@ H5FD_log_fapl_free(void *_fa) { H5FD_log_fapl_t *fa = (H5FD_log_fapl_t*)_fa; - FUNC_ENTER(H5FD_log_fapl_free, FAIL); + FUNC_ENTER_NOAPI(H5FD_log_fapl_free, FAIL); /* Free the fapl information */ if(fa->logfile) @@ -478,7 +478,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, h5_stat_t sb; H5P_genplist_t *plist; /* Property list */ - FUNC_ENTER(H5FD_log_open, NULL); + FUNC_ENTER_NOAPI(H5FD_log_open, NULL); /* Check arguments */ if (!name || !*name) @@ -578,7 +578,7 @@ H5FD_log_close(H5FD_t *_file) struct timeval timeval_diff; #endif /* H5_HAVE_GETTIMEOFDAY */ - FUNC_ENTER(H5FD_log_close, FAIL); + FUNC_ENTER_NOAPI(H5FD_log_close, FAIL); if (H5FD_log_flush(_file,TRUE)<0) HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to flush file"); @@ -706,7 +706,7 @@ H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2) const H5FD_log_t *f2 = (const H5FD_log_t*)_f2; int ret_value=0; - FUNC_ENTER(H5FD_log_cmp, H5FD_VFD_DEFAULT); + FUNC_ENTER_NOAPI(H5FD_log_cmp, H5FD_VFD_DEFAULT); #ifdef WIN32 if (f1->fileindexhi < f2->fileindexhi) ret_value= -1; @@ -758,7 +758,7 @@ H5FD_log_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */) { herr_t ret_value=SUCCEED; - FUNC_ENTER(H5FD_log_query, FAIL); + FUNC_ENTER_NOAPI(H5FD_log_query, FAIL); /* Set the VFL feature flags that this driver supports */ if(flags) { @@ -794,7 +794,7 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hsize_t size) H5FD_log_t *file = (H5FD_log_t*)_file; haddr_t addr; - FUNC_ENTER(H5FD_log_alloc, HADDR_UNDEF); + FUNC_ENTER_NOAPI(H5FD_log_alloc, HADDR_UNDEF); /* Compute the address for the block to allocate */ addr = file->eoa; @@ -847,7 +847,7 @@ H5FD_log_get_eoa(H5FD_t *_file) { H5FD_log_t *file = (H5FD_log_t*)_file; - FUNC_ENTER(H5FD_log_get_eoa, HADDR_UNDEF); + FUNC_ENTER_NOAPI(H5FD_log_get_eoa, HADDR_UNDEF); FUNC_LEAVE(file->eoa); } @@ -876,7 +876,7 @@ H5FD_log_set_eoa(H5FD_t *_file, haddr_t addr) { H5FD_log_t *file = (H5FD_log_t*)_file; - FUNC_ENTER(H5FD_log_set_eoa, FAIL); + FUNC_ENTER_NOAPI(H5FD_log_set_eoa, FAIL); file->eoa = addr; @@ -909,7 +909,7 @@ H5FD_log_get_eof(H5FD_t *_file) { H5FD_log_t *file = (H5FD_log_t*)_file; - FUNC_ENTER(H5FD_get_get_eof, HADDR_UNDEF); + FUNC_ENTER_NOAPI(H5FD_get_get_eof, HADDR_UNDEF); FUNC_LEAVE(MAX(file->eof, file->eoa)); } @@ -941,7 +941,7 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr H5FD_log_t *file = (H5FD_log_t*)_file; ssize_t nbytes; - FUNC_ENTER(H5FD_log_read, FAIL); + FUNC_ENTER_NOAPI(H5FD_log_read, FAIL); assert(file && file->pub.cls); assert(buf); @@ -1054,7 +1054,7 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t add struct timeval timeval_diff; #endif /* H5_HAVE_GETTIMEOFDAY */ - FUNC_ENTER(H5FD_log_write, FAIL); + FUNC_ENTER_NOAPI(H5FD_log_write, FAIL); assert(file && file->pub.cls); assert(size>0); @@ -1215,7 +1215,7 @@ H5FD_log_flush(H5FD_t *_file, unsigned UNUSED closing) { H5FD_log_t *file = (H5FD_log_t*)_file; - FUNC_ENTER(H5FD_log_flush, FAIL); + FUNC_ENTER_NOAPI(H5FD_log_flush, FAIL); if (file->eoa>file->eof) { if (-1==file_seek(file->fd, (file_offset_t)(file->eoa-1), SEEK_SET)) |