PowerDOS is a GEMDOS extension for preemptive multitasking.
For more information, see the PowerDOS Programmer's Manual.
New modes for Pexec provide multitasking and threads support:
mode | Meaning |
0x10 | Like mode 0, except that the parent continues to operate concurrently with the newly created child task. |
0x16 | Like mode 6, except that the parent continues to operate concurrently with the newly created child task. |
0x17 | Execute a code fragment that is within the text segment of the calling process. |
0x18 | Like mode 0x17, except that it allows a number of INTs to be placed on the stack of the new task. |
PowerDOS adds the function Flock and the cookie _FLK conforming to the specification for GEMDOS File Sharing & Record Locking.
The following list is a synopsis of the PowerDOS routines, sorted by function numbers:
128 | Puserid Get or set Group.User ID of a process
Syntax: int32_t Puserid(int16_t process_id, int16_t flag, int32_t new_group_user) |
129 | Ppriority Set or get the priority of given process
Syntax: int32_t Ppriority(int16_t process_id, int16_t new_priority) |
130 | Pgetpid Get current process' process ID
Syntax: int16_t Pgetpid() |
131 | Pgetppid Get current process' parent's process ID
Syntax: int32_t Pgetppid() |
132 | Pgetpd Return pointer to process descriptor of given
process
Syntax: void *Pgetpd(int16_t process_id) |
133 | Pfindpid Find the process ID of a process with the
given name
Syntax: int32_t Pfindpid(int8_t *process_name) |
134 | Pprocinf Return information about process
Syntax: int32_t Pprocinf(int16_t process_id, struct PROCINFO *buffer) |
135 | Pnice Change process priority using delta
Syntax: int32_t Pnice(int16_t process_id, int16_t delta) |
136 | Smalloc Allocate a block of system memory (top down)
Syntax: char *Smalloc(int32_t mem_size) |
137 | Massign Assign a block of memory owned by calling
process to process of given process ID
Syntax: int32_t Massign(int16_t process_id, int8_t *mem_start) |
139 | Fstatus Perform various status operations on an open
file
Syntax: int32_t Fstatus(int16_t handle, int16_t sub_function, ...) |
140 | Fsfirstidx Perform Fsfirst function with index into
directory structure
Syntax: int32_t Fsfirstidx(int8_t *pathname, int16_t attributes, int16_t index) |
141 | Wake_parent Wake parent process of current process
Syntax: int32_t Wake_parent(int16_t code) |
142 | Wait Wait for child process to terminate
Syntax: int32_t Wait() |
143 | Sleep Sleep (block) for specified time, or indefinately
Syntax: int32_t Sleep(int32_t time) |
144 | Ioqueue Link to queue of processes waiting for access
I/O
Syntax: int32_t Ioqueue(int16_t process_id, int32_t time) |
145 | Wait_dt Wait (block) until a specified date/time
Syntax: int32_t Wait_dt(uint32_t date_time) |
146 | Dev_create Create a new I/O device
Syntax: int32_t Dev_create(int8_t *dev_name, int8_t *fm_name, int8_t *drv_name, int8_t *path_vars, int8_t *dev_vars, int16_t share) |
147 | Fm_add Add a new file manager to the system
Syntax: int32_t Fm_add(int8_t *fm_name, int8_t *subroutine_tab, int8_t *fm_vars, int16_t fm_type) |
148 | Drv_add Add a new device driver to the system, or
replace an old one
Syntax: int32_t Drv_add(int8_t *drv_name, int8_t *subroutine_tab, int8_t *drv_vars) |
149 | Devinfo Return device info for requested device index
Syntax: int32_t Devinfo(int16_t idx, struct dev_info *buffer) |
150 | Send Send a signal to a process
Syntax: int32_t Send(int16_t process_id, int32_t signal_code) |
151 | Sig_intercept Install signal intercept routine
Syntax: int32_t Sig_intercept(int16_t (*intercept_rtn)(int32_t, void*), int32_t *var_ptr) |
152 | Suspend Suspend a process
Syntax: int32_t Suspend(int16_t process_id) |
153 | Q_message The Message Queue
Syntax: int16_t Q_message(struct mq_params *mqparams) |
154 | Semaphore The Semaphore function
Syntax: int16_t Semaphore(struct s_params *sparams) |
155 | Mem_share Shared memory
Syntax: int16_t Mem_share(struct ms_params *msparams) |
158 | Chgvector Read or modify a GEMDOS, BIOS or XBIOS
function vector
Syntax: int32_t Chgvector(int16_t trap_num, int16_t vector_num, int8_t *new_vector) |
159 | Chgsysvar Read or modify a PowerDOS internal variable
Syntax: int32_t Chgsysvar(int16_t var_num, int16_t flag, int32_t new_value) |
160 | Pname Read or modify the name of a process
Syntax: int32_t Pname(int16_t proc_id, int16_t get_set, int8_t *name) |
161 | Pvector Read or modify a process' user vector
Syntax: int32_t Pvector(int16_t proc_id, int32_t vector) |
162 | Pattrib Set or clear bits in a process' attribute byte
Syntax: int32_t Pattrib(int16_t proc_id, unsigned char flag, unsigned char mask) |
163 | Pmaxmem Set or get the maximum memory returned for
Malloc(-1) for a process
Syntax: int32_t Pmaxmem(int16_t proc_id, int16_t flag, int32_t size) |
See also: GEMDOS BIOS function list XBIOS function list Cookie PDOS Cookie _FLK