National Instruments NI-VXI User Manual

Page 67

Advertising
background image

Chapter 3 Software Overview

© National Instruments Corporation

3-29

NI-VXI User Manual

can have multiple pointers in the same process or over multiple
processes to access a particular window simultaneously, while still
guaranteeing that the hardware context does not change between
accesses. The call succeeds under either of the following conditions:

No processes are mapped for the window (first caller for
Access-Only Privilege for this window). The hardware context is
set as requested in the call. The call returns a successful status and a
valid C pointer and windowId for Access-Only Privilege.

No process currently has Owner Privilege to the required window.
There are processes with Access-Only Privilege, but they are using
the same hardware context (privilege state, byte order, address
range) for their accesses to the window. Because the hardware
context is compatible, it does not need to be changed. The call
returns a successful status and a valid C pointer and windowId for
Access-Only Privilege.

The successful call returns a valid pointer and a non-negative return
value. The 32-bit window number signifies that the access privileges to
the window are Access-Only Privilege.

With Access-Only Privilege, you cannot use the

SetPrivilege

,

SetByteOrder

, and

SetContext

calls in your application to

dynamically change the hardware context. No Access-Only accessor
can change the state of the window. The initial Access-Only call sets
the hardware context for the window, which cannot be changed until
all Access-Only accessors have called

UnMapVXIAddress

to free the

window. The functions

GetPrivilege

,

GetByteOrder

, and

GetContext

will succeed regardless of whether the caller has Owner

Privilege or Access-Only Privilege.

The following paragraphs describe the low-level VXIbus access
functions. The descriptions are presented at a functional level
describing the operation of each of the functions. The functions are
grouped by area of functionality.

Note:

On MITE-based platforms,

MapVXIAddress

cannot be called while the

CPU is in interrupt context. For this reason, it is recommended that you
not use the

SaveContext

and

RestoreContext

functions. Due to the

multiple window support of the MITE, you should not need these
functions.

Advertising