M_TEST_ACCESS(3)

EXPERIMENTAL_FUNC
m_test_access - Test if a block of memory is accessible.

SYNOPSIS
#include <karma_m.h>

flag m_test_access

(void *start, uaddr size, flag write)

DESCRIPTION
Test if a block of memory is accessible.

start
    The starting address of the memory block.

size
    The size (in bytes) of the memory block.

write
    If TRUE a write test is performed in addition to a read test. This will temporarily change the contents of the memory block. The contents will be restored. If FALSE, only a read test is performed.

RETURN VALUE
TRUE if the all requested tests succeeded, else FALSE if any test failed.

Multi-threading Level
Unsafe.

NOTES
The SIGSEGV signal handler is temporarily changed.

The sigsetjmp(3) and siglongjmp(3) functions are used.

Since this function makes calls to the Operating System, frequent use may degrade performance.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/