[an error occurred while processing this directive]

HP OpenVMS Systems

C Programming Language
Content starts here

Add_Aligned_Word_Interlocked

The _ADAWI function adds its source operand to the destination. This operation is interlocked against similar operations by other processors or devices in the system. Syntax: typedef enum {_adawi_sum_neg=-1, _adawi_sum_zero, _adawi_sum_pos} _ADAWI_STATUS; _ADAWI_STATUS _ADAWI(short __src, short *__dest);

__ALLOCA

Allocates n bytes from the stack and returns a pointer to the allocated memory. Syntax: void *__ALLOCA (unsigned int n);

Branch_on_Bit_Clear-Clear_Interlocked

The _BBCCI function performs the following functions in interlocked fashion: o Returns the complement of the bit specified by the two arguments o Clears the bit specified by the two arguments Syntax: typedef enum {_bbcci_oldval_1, _bbcci_oldval_0} _BBCCI_STATUS; _BBCCI_STATUS _BBCCI(int __position, void *__address);

Branch_on_Bit_Set-Set_Interlocked

The _BBSSI function performs the following functions in interlocked fashion: o Returns the status of the bit specified by the two arguments o Sets the bit specified by the two arguments Syntax: typedef enum {_bbssi_oldval_0, _bbcci_oldval_1} _BBSSI_STATUS; _BBSSI_STATUS _BBSSI(int __position, void *__address);

Find_First_Clear_Bit

The _FFC function finds the position of the first clear bit in a field. The bits are tested for clear status starting at bit 0 and extending to the highest bit in the field. Syntax: typedef enum {_ff_bit_not_found, _ff_bit_found} _FF_STATUS; _FF_STATUS _FFC(int __start, char __size, const void * __base, int *__position);

Find_First_Set_Bit

The _FFS function finds the position of the first set bit in a field. The bits are tested for set status starting at bit 0 and extending to the highest bit in the field. Syntax: typedef enum {_ff_bit_not_found, _ff_bit_found} _FF_STATUS; _FF_STATUS _FFS(int __start, char __size, const void *__base, int *__position);

Halt

The _HALT function halts the processor when executed by a process running in kernel mode. This is a privileged function. Syntax: void _HALT(void);

Insert_Entry_into_Queue_at_Head_Interlocked

The _INSQHI function inserts an entry into the front of a queue in an indivisible manner. This operation is interlocked against similar operations by other processors or devices in the system. Syntax: typedef enum {_insqi_inserted_many, _insqi_not_inserted, _insqi_inserted_only} _INSQI_STATUS; _INSQI_STATUS _INSQHI(void *__new_entry, void *__head);

Insert_Entry_into_Queue_at_Tail_Interlocked

The _INSQTI function inserts an entry at the end of a queue in an indivisible manner. This operation is interlocked against similar operations by other processors or devices in the system. Syntax: typedef enum {_insqi_inserted_many, _insqi_not_inserted, _insqi_inserted_only} _INSQI_STATUS; _INSQI_STATUS _INSQTI(void *__new_entry, void *__head);

Insert_Entry_in_Queue

The _INSQUE function inserts a new entry into a queue following an existing entry. Syntax: typedef enum {_insque_inserted_only, _insque_inserted_many} _INSQUE_STATUS; _INSQUE_STATUS _INSQUE(void *__new_entry, void *__predecessor);

Locate_Character

The _LOCC function locates the first character in a string matching the target character. Syntax: unsigned short _LOCC(char __target, unsigned short __length, const char *__string, ...); where the optional argument (...) is char **position.

Move_from_Processor_Register

The _MFPR function returns the contents of a processor register. This is a privileged function. Syntax: void _MFPR(int register_num, int *destination); void _MFPR(int register_num, unsigned int *destination);

Move_Character_3_Operand

The _MOVC3 function copies a block of memory. It is the preferred way to copy a block of memory to a new location. Syntax: void _MOVC3(unsigned short __length, const char *__src, char *__dest, ...); where the ... is one or two optional arguments: o char **endscr o char **enddest

Move_Character_5_Operand

The _MOVC5 function allows the source string specified by the pointer and length pair to be moved to the destination string specified by the other pointer and length pair. If the source string is smaller than the destination string, the destination string is padded with the specified character. Syntax: void _MOVC5(unsigned short __srclen, const char *__src, char __fill, unsigned short __destlen, char *__dest, ...); where the ... is one to three optional arguments: o unsigned short *unmoved_src o char ** endscr o char **enddest

Move_from_Processor_Status_Longword

The _MOVPSL function stores the value of the Processor Status Longword (PSL). Syntax: void _MOVPSL(void *__psl);

Move_to_Processor_Register

The _MTPR function loads a value into one of the special processor registers. It is a privileged function. Syntax: int _MTPR(int src, int register_num);

Probe_Read_Accessibility

The _PROBER function checks to see if you can read the first and last byte of the given address and length pair. Syntax: typedef enum {_probe_not_accessible, _probe_accessible} _PROBE_STATUS; _PROBE_STATUS _PROBER(char __mode, unsigned short __length, const void *__address);

Probe_Write_Accessibility

The _PROBEW function checks the write accessibility of the first and last byte of the given address and length pair. Syntax: typedef enum {_probe_not_accessible, _probe_accessible} _PROBE_STATUS; _PROBE_STATUS _PROBEW(char __mode, unsigned short __length, const void *__address);

Read_General-Purpose_Register

The _READ_GPR function returns the value of a general-purpose register. Syntax: int _READ_GPR(int register_number);

Remove_Entry_from_Queue_at_Head_Interlocked

The _REMQHI function removes the first entry from the queue in an indivisible manner. This operation is interlocked against similar operations by other processors or devices in the system. Syntax: typedef enum {_remqi_removed_more, _remqi_not_removed, _remqi_removed_empty, _remqi_empty} _REMQI_STATUS; _REMQI_STATUS _REMQHI(void *__head), void *__removed_entry);

Remove_Entry_from_Queue_at_Tail_Interlocked

The _REMQTI function removes the last entry from the queue in an indivisible manner. This operation is interlocked against similar operations by other processors or devices in the system. Syntax: typedef enum {_remqi_removed_more, _remqi_not_removed, _remqi_removed_empty, _remqi_empty} _REMQI_STATUS; _REMQI_STATUS _REMQTI(void *__head, void *__removed_entry);

Remove_Entry_from_Queue

The _REMQUE function removes an entry from a queue. Syntax: typedef enum {_remque_removed_more, _remque_removed_empty, _remque_empty} _REMQUE_STATUS; _REMQUE_STATUS _REMQUE(void *__entry, void *__removed_entry);

Scan_Characters

The _SCANC function locates the first character in a string with the desired attributes. The attributes are specified through a table and a mask. Syntax: unsigned short _SCANC(unsigned short __length, const char *__string, const char *__table, char __mask, ...); where the optional argument (...) is char **match.

Skip_Character

The _SKPC function locates the first character in a string that does not match the target character. Syntax: unsigned short _SKPC(char __target, unsigned short __length, const char *__string, ... ); where the optional argument (...) is char **position.

Span_Characters

The _SPANC function locates the first character in a string without certain attributes. The attributes are specified through a table and a mask. Syntax: unsigned short _SPANC(unsigned short __length, const char *__string, const char *__table, char __mask, ...); where the optional argument (...) is char **mask.