11.01.2013 Views

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

# ls core<br />

core not found<br />

Because the child process was able to read and write the content of shared object, there is no<br />

core file at this time.<br />

User key API<br />

The following data structures and APIs are declared for the user key feature. They are<br />

declared in . For a more detailed explanation of the APIs refer to the <strong>IBM</strong> white<br />

paper “Storage Protection Keys on <strong>AIX</strong> Version 5.3”, which can be downloaded from:<br />

ftp://ftp.software.ibm.com/common/ssi/rep_wh/n/PSW03013USEN/PSW03013USEN.PDF<br />

In <strong>AIX</strong> V6.1 documentation, the white paper is available at:<br />

http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp<br />

ukey_t<br />

This is a basic type for a user-mode storage protection key.<br />

ukeyset_t<br />

This is a user key set with read/write attributes for each key in the set.<br />

sysconf(_SC_<strong>AIX</strong>_UKEYS)<br />

This returns the number of user keys available.<br />

int ukey_enable()<br />

This grants a process access to user keys memory protection<br />

facilities. It returns the number of user keys configured on the system.<br />

int ukey_getkey(void *addr, ukey_t *ukey)<br />

This is used to determine the user key associated with a memory<br />

address.<br />

int ukey_protect (void *addr, size_t len, ukey_t ukey)<br />

This modifies the memory's user key protection for a given address<br />

range. This range must include only whole pages.<br />

int ukeyset_init (ukeyset_t *nset, unsigned int flags)<br />

This initializes a user key set with just UKEY_PUBLIC (unless<br />

UK_INIT_ADD_PRIVATE flag is specified). The value of “flags” may<br />

be UK_READ, UK_WRITE, or UK_RW.<br />

int ukeyset_add_key (ukeyset_t *set, ukey_t key, unsigned int flags)<br />

This adds a user key to a user key set.<br />

int ukeyset_remove_key (ukeyset_t *set, ukey_t key, unsigned int flags)<br />

This removes a user key from a user key set. The value of “flags” may<br />

be UK_READ, UK_WRITE, or UK_RW.<br />

int ukeyset_ismember (ukeyset_t set, ukey_t key, unsigned int flags)<br />

This determines if a key is part of a keyset. The value of “flags” may be<br />

UK_READ, UK_WRITE, or UK_RW.<br />

int ukeyset_add_set (ukeyset_t *set, ukeyset_t aset)<br />

This adds a user key set.<br />

int ukeyset_remove_set (ukeyset_t *set, ukeyset_t rset)<br />

This removes a user key set.<br />

int pthread_attr_getukeyset_np (pthread_attr_t *attr, ukeyset_t *ukeyset)<br />

This returns a thread attributes object's user key set attribute.<br />

Chapter 3. <strong>AIX</strong> advanced continuous availability tools and features 107

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!