a_update

Updates all physical, named, remote, and DOS data or directory files on a device by writing all partial sectors that remain buffered in the BIOS.

Syntax, PL/M and C

CALL rq$a$update (connection, resp_mbox, except_ptr);

rq_a_update (connection, resp_mbox, except_ptr);

Parameter PL/M Data Type C Data Type
connection SELECTOR SELECTOR
resp_mbox SELECTOR SELECTOR
except_ptr POINTER to WORD_16 UINT_16 far *

Parameters

connection
A token for a file or device connection.

resp_mbox
The mailbox that receives a token for an IORS. A null selector means that you do not want to receive an IORS.

except_ptr
A pointer to a variable declared by the application where the sequential part of the call returns a condition code.

Additional Information

When the BIOS performs an a_write operation, it writes only entire sectors. If a partial sector remains to be written, the BIOS usually leaves the data in an output buffer. The next time a_write is called, the BIOS combines the leftover data in the buffer with the data in the new request and again begins writing entire sectors. A_update forces the BIOS to finish the writing operation for a device by writing all buffers pertaining to files on a particular device. This ensures that files on removable volumes such as diskettes are updated before removal.

A_update has no effect on buffers that the EIOS manages.

See also:a_write

Three different events can cause the BIOS to update a device:

·Calling a_update

·Fixed updating

·Timeout updating

Fixed updating and timeout updating are triggered by the passing of possibly different amounts of time.

See also:Fixed updating and timeout updating, Introducing the iRMX Operating Systems

Condition Codes

Sequential Condition Codes: returned immediately to except_ptr

E_OK 0000H No exceptional conditions occurred.
E_EXIST 0006H At least one of these is true:

·One or more of the connection or resp_mbox parameters is not a token for an existing object.

·The connection is being deleted.

·The connection for a remote driver is no longer active.

E_IFDR 002FH An attempt was made to update a stream file connection.
E_LIMIT 0004H At least one of these is true:

·The calling task's job has already reached its object limit.

·The number of outstanding I/O operations for a remote connection has been exceeded.

E_MEM 0002H The memory available to the calling task's job is not sufficient to complete the call.
E_NOT_CONFIGURED 0008H This system call is not part of the present configuration.
E_SUPPORT 0023H The specified connection was not created by this job.
E_TYPE 8002H Either the connection parameter is not a token for a connection object, or the resp_mbox parameter is not a mailbox token.

Concurrent Condition Codes: returned asynchronously to resp_mbox

E_OK 0000H No exceptional conditions occurred.
E_IO 002BH An I/O error occurred which might have prevented the operation from completing. Examine the unit_status field of the IORS for more information.

See also:IORS, Chapter 1,
Accessing the IORS, Programming Techniques

E_NOT_FILE_CONN 0032H The connection parameter is a device connection, not a file connection.