# HG changeset patch # User Mychaela Falconia # Date 1531688528 0 # Node ID ed162c9cd29fd1c483ad8ec846220d6e572524ea # Parent 0f80e1e4dce4700aebb71d28502cc3dbc63beb4a src/gpf/inc/nuc: old Nucleus headers moved into old subdir diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/arm7/nucleus.h --- a/src/gpf/inc/nuc/arm7/nucleus.h Sun Jul 15 20:57:33 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1120 +0,0 @@ -/*************************************************************************/ -/* */ -/* Copyright (c) 1993-1994 Accelerated Technology, Inc. */ -/* */ -/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ -/* subject matter of this material. All manufacturing, reproduction, */ -/* use, and sales rights pertaining to this subject matter are governed */ -/* by the license agreement. The recipient of this software implicitly */ -/* accepts the terms of the license. */ -/* */ -/*************************************************************************/ - -/*************************************************************************/ -/* */ -/* FILE NAME VERSION */ -/* */ -/* nucleus.h PLUS/THUMB/T 1.0 */ -/* */ -/* COMPONENT */ -/* */ -/* System Constants */ -/* */ -/* DESCRIPTION */ -/* */ -/* This file contains system constants common to both the */ -/* application and the actual Nucleus PLUS components. This file */ -/* also contains data structure definitions that hide internal */ -/* information from the application. */ -/* */ -/* AUTHOR */ -/* */ -/* Barry Sellew, Accelerated Technology, Inc. */ -/* */ -/* DATA STRUCTURES */ -/* */ -/* NU_DRIVER I/O Driver control block */ -/* NU_EVENT_GROUP Event group control block */ -/* NU_HISR HISR control block */ -/* NU_MAILBOX Mailbox control block */ -/* NU_MEMORY_POOL Memory Pool control block */ -/* NU_PARTITION_POOL Partition Pool control block */ -/* NU_PIPE Pipe control block */ -/* NU_QUEUE Queue control block */ -/* NU_SEMAPHORE Semaphore control block */ -/* NU_TASK Task control block */ -/* NU_TIMER Timer control block */ -/* NU_PROTECT Protection structure */ -/* */ -/* FUNCTIONS */ -/* */ -/* None */ -/* */ -/* DEPENDENCIES */ -/* */ -/* None */ -/* */ -/* HISTORY */ -/* */ -/* NAME DATE REMARKS */ -/* */ -/* W. Lamie 04-19-1994 Created R4xxx version 1.0 */ -/* */ -/*************************************************************************/ - -/* Check to see if this file has been included already. */ - -#ifndef NUCLEUS - -#ifdef __cplusplus -extern "C" { /* C declarations in C++ */ -#endif - -#define NUCLEUS - -/* Define standard data types. These definitions allow Nucleus PLUS to - perform in the same manner on different target platforms. */ - -typedef unsigned long UNSIGNED; -typedef long SIGNED; -typedef unsigned char DATA_ELEMENT; -typedef DATA_ELEMENT OPTION; -typedef int STATUS; -typedef unsigned char UNSIGNED_CHAR; -typedef char CHAR; -typedef int INT; -typedef void VOID; -typedef unsigned long * UNSIGNED_PTR; -typedef unsigned char * BYTE_PTR; - - -/* Define register defines. R1, R2, R3, and R4 are used in the Nucleus PLUS - source code in front of variables that are referenced often. In some - ports, defining them as "register" will improve performance. */ - -#define R1 register -#define R2 register -#define R3 register -#define R4 register - - -/* Define the number of accesses required to read or write a pointer data - type. This value is used to make optimizations in some ports of Nucleus - PLUS. */ - -#define NU_POINTER_ACCESS 1 - - -/* Define the padding required for usage of the DATA_ELEMENT type within - Nucleus PLUS structures. These values insure proper alignment for the - next structure member. */ - -#define PAD_1 3 -#define PAD_2 2 -#define PAD_3 1 - - - -/* Define constants that are target dependent and/or are used for internal - purposes. */ - -#define NU_MIN_STACK_SIZE 240 -#define NU_MAX_NAME 8 -#define NU_MAX_VECTORS 8 -#define NU_MAX_LISRS 8 - - -/* Define constants for the number of UNSIGNED words in each of the basic - system data structures. */ - -#define NU_TASK_SIZE 42 -#define NU_HISR_SIZE 22 -#define NU_MAILBOX_SIZE 13 -#define NU_QUEUE_SIZE 18 -#define NU_PIPE_SIZE 18 -#define NU_SEMAPHORE_SIZE 10 -#define NU_EVENT_GROUP_SIZE 9 -#define NU_PARTITION_POOL_SIZE 15 -#define NU_MEMORY_POOL_SIZE 17 -#define NU_TIMER_SIZE 17 -#define NU_PROTECT_SIZE 2 -#define NU_DRIVER_SIZE 3 - - -/* Define what an interrupt vector looks like on the target processor. */ - -typedef struct NU_VECTOR_STRUCT -{ - VOID *pointer; -} NU_VECTOR; - - -/* Define constants for use in service parameters. */ - -#define NU_AND 2 -#define NU_AND_CONSUME 3 -#define NU_DISABLE_TIMER 4 -#define NU_ENABLE_TIMER 5 -#define NU_FALSE 0 -#define NU_FIFO 6 -#define NU_FIXED_SIZE 7 -#define NU_NO_PREEMPT 8 -#define NU_NO_START 9 -#define NU_NO_SUSPEND 0 -#define NU_NULL 0 -#define NU_OR 0 -#define NU_OR_CONSUME 1 -#define NU_PREEMPT 10 -#define NU_PRIORITY 11 -#define NU_START 12 -#define NU_SUSPEND 0xFFFFFFFFUL -#define NU_TRUE 1 -#define NU_VARIABLE_SIZE 13 - - -/* Define interrupt lockout and enable constants. */ - -#define NU_DISABLE_INTERRUPTS 0xC0 -#define NU_ENABLE_INTERRUPTS 0x00 - - -/* Define task suspension constants. */ - -#define NU_DRIVER_SUSPEND 10 -#define NU_EVENT_SUSPEND 7 -#define NU_FINISHED 11 -#define NU_MAILBOX_SUSPEND 3 -#define NU_MEMORY_SUSPEND 9 -#define NU_PARTITION_SUSPEND 8 -#define NU_PIPE_SUSPEND 5 -#define NU_PURE_SUSPEND 1 -#define NU_QUEUE_SUSPEND 4 -#define NU_READY 0 -#define NU_SEMAPHORE_SUSPEND 6 -#define NU_SLEEP_SUSPEND 2 -#define NU_TERMINATED 12 - -/* Define service completion status constants. */ - -#define NU_SUCCESS 0 -#define NU_END_OF_LOG -1 -#define NU_GROUP_DELETED -2 -#define NU_INVALID_DELETE -3 -#define NU_INVALID_DRIVER -4 -#define NU_INVALID_ENABLE -5 -#define NU_INVALID_ENTRY -6 -#define NU_INVALID_FUNCTION -7 -#define NU_INVALID_GROUP -8 -#define NU_INVALID_HISR -9 -#define NU_INVALID_MAILBOX -10 -#define NU_INVALID_MEMORY -11 -#define NU_INVALID_MESSAGE -12 -#define NU_INVALID_OPERATION -13 -#define NU_INVALID_PIPE -14 -#define NU_INVALID_POINTER -15 -#define NU_INVALID_POOL -16 -#define NU_INVALID_PREEMPT -17 -#define NU_INVALID_PRIORITY -18 -#define NU_INVALID_QUEUE -19 -#define NU_INVALID_RESUME -20 -#define NU_INVALID_SEMAPHORE -21 -#define NU_INVALID_SIZE -22 -#define NU_INVALID_START -23 -#define NU_INVALID_SUSPEND -24 -#define NU_INVALID_TASK -25 -#define NU_INVALID_TIMER -26 -#define NU_INVALID_VECTOR -27 -#define NU_MAILBOX_DELETED -28 -#define NU_MAILBOX_EMPTY -29 -#define NU_MAILBOX_FULL -30 -#define NU_MAILBOX_RESET -31 -#define NU_NO_MEMORY -32 -#define NU_NO_MORE_LISRS -33 -#define NU_NO_PARTITION -34 -#define NU_NOT_DISABLED -35 -#define NU_NOT_PRESENT -36 -#define NU_NOT_REGISTERED -37 -#define NU_NOT_TERMINATED -38 -#define NU_PIPE_DELETED -39 -#define NU_PIPE_EMPTY -40 -#define NU_PIPE_FULL -41 -#define NU_PIPE_RESET -42 -#define NU_POOL_DELETED -43 -#define NU_QUEUE_DELETED -44 -#define NU_QUEUE_EMPTY -45 -#define NU_QUEUE_FULL -46 -#define NU_QUEUE_RESET -47 -#define NU_SEMAPHORE_DELETED -48 -#define NU_SEMAPHORE_RESET -49 -#define NU_TIMEOUT -50 -#define NU_UNAVAILABLE -51 - - -/* Define system errors. */ - -#define NU_ERROR_CREATING_TIMER_HISR 1 -#define NU_ERROR_CREATING_TIMER_TASK 2 -#define NU_STACK_OVERFLOW 3 -#define NU_UNHANDLED_INTERRUPT 4 - - -/* Define I/O driver constants. */ - -#define NU_IO_ERROR -1 -#define NU_INITIALIZE 1 -#define NU_ASSIGN 2 -#define NU_RELEASE 3 -#define NU_INPUT 4 -#define NU_OUTPUT 5 -#define NU_STATUS 6 -#define NU_TERMINATE 7 - - -/* Define history entry IDs. */ - -#define NU_USER_ID 1 -#define NU_CREATE_TASK_ID 2 -#define NU_DELETE_TASK_ID 3 -#define NU_RESET_TASK_ID 4 -#define NU_TERMINATE_TASK_ID 5 -#define NU_RESUME_TASK_ID 6 -#define NU_SUSPEND_TASK_ID 7 -#define NU_RELINQUISH_ID 8 -#define NU_SLEEP_ID 9 -#define NU_CHANGE_PRIORITY_ID 10 -#define NU_CHANGE_PREEMPTION_ID 11 -#define NU_CREATE_MAILBOX_ID 12 -#define NU_DELETE_MAILBOX_ID 13 -#define NU_RESET_MAILBOX_ID 14 -#define NU_SEND_TO_MAILBOX_ID 15 -#define NU_BROADCAST_TO_MAILBOX_ID 16 -#define NU_RECEIVE_FROM_MAILBOX_ID 17 -#define NU_CREATE_QUEUE_ID 18 -#define NU_DELETE_QUEUE_ID 19 -#define NU_RESET_QUEUE_ID 20 -#define NU_SEND_TO_FRONT_OF_QUEUE_ID 21 -#define NU_SEND_TO_QUEUE_ID 22 -#define NU_BROADCAST_TO_QUEUE_ID 23 -#define NU_RECEIVE_FROM_QUEUE_ID 24 -#define NU_CREATE_PIPE_ID 25 -#define NU_DELETE_PIPE_ID 26 -#define NU_RESET_PIPE_ID 27 -#define NU_SEND_TO_FRONT_OF_PIPE_ID 28 -#define NU_SEND_TO_PIPE_ID 29 -#define NU_BROADCAST_TO_PIPE_ID 30 -#define NU_RECEIVE_FROM_PIPE_ID 31 -#define NU_CREATE_SEMAPHORE_ID 32 -#define NU_DELETE_SEMAPHORE_ID 33 -#define NU_RESET_SEMAPHORE_ID 34 -#define NU_OBTAIN_SEMAPHORE_ID 35 -#define NU_RELEASE_SEMAPHORE_ID 36 -#define NU_CREATE_EVENT_GROUP_ID 37 -#define NU_DELETE_EVENT_GROUP_ID 38 -#define NU_SET_EVENTS_ID 39 -#define NU_RETRIEVE_EVENTS_ID 40 -#define NU_CREATE_PARTITION_POOL_ID 41 -#define NU_DELETE_PARTITION_POOL_ID 42 -#define NU_ALLOCATE_PARTITION_ID 43 -#define NU_DEALLOCATE_PARTITION_ID 44 -#define NU_CREATE_MEMORY_POOL_ID 45 -#define NU_DELETE_MEMORY_POOL_ID 46 -#define NU_ALLOCATE_MEMORY_ID 47 -#define NU_DEALLOCATE_MEMORY_ID 48 -#define NU_CONTROL_SIGNALS_ID 49 -#define NU_RECEIVE_SIGNALS_ID 50 -#define NU_REGISTER_SIGNAL_HANDLER_ID 51 -#define NU_SEND_SIGNALS_ID 52 -#define NU_REGISTER_LISR_ID 53 -#define NU_CREATE_HISR_ID 54 -#define NU_DELETE_HISR_ID 55 -#define NU_CREATE_TIMER_ID 56 -#define NU_DELETE_TIMER_ID 57 -#define NU_CONTROL_TIMER_ID 58 -#define NU_RESET_TIMER_ID 59 -#define NU_CREATE_DRIVER_ID 60 -#define NU_DELETE_DRIVER_ID 61 -#define NU_REQUEST_DRIVER_ID 62 -#define NU_RESUME_DRIVER_ID 63 -#define NU_SUSPEND_DRIVER_ID 64 -#define NU_CHANGE_TIME_SLICE_ID 65 - - -/* Define the basic data structure templates. If the NU_DEBUG conditional - compilation is specified, the actual structure definition is used. */ - -#ifdef NU_DEBUG -#include "cs_defs.h" -#include "tm_defs.h" -#include "tc_defs.h" -#include "mb_defs.h" -#include "qu_defs.h" -#include "pi_defs.h" -#include "sm_defs.h" -#include "ev_defs.h" -#include "pm_defs.h" -#include "dm_defs.h" -#endif - - -#ifndef NU_DEBUG - -/* Define task control data structure with all internal information - hidden. */ -typedef struct NU_TASK_STRUCT -{ - UNSIGNED words[NU_TASK_SIZE]; -} NU_TASK; -#else - -/* Define task control data structure with the actual internal data - structure. */ -typedef TC_TCB NU_TASK; -#endif - - -#ifndef NU_DEBUG - -/* Define HISR control data structure with all internal information - hidden. */ -typedef struct NU_HISR_STRUCT -{ - UNSIGNED words[NU_HISR_SIZE]; -} NU_HISR; -#else - -/* Define HISR control data structure with the actual internal data - structure. */ -typedef TC_HCB NU_HISR; -#endif - - -#ifndef NU_DEBUG - -/* Define mailbox control data structure with all internal information - hidden. */ -typedef struct NU_MAILBOX_STRUCT -{ - UNSIGNED words[NU_MAILBOX_SIZE]; -} NU_MAILBOX; -#else - -/* Define mailbox control data structure with the actual internal data - structure. */ -typedef MB_MCB NU_MAILBOX; -#endif - - -#ifndef NU_DEBUG - -/* Define queue control data structure with all internal information - hidden. */ -typedef struct NU_QUEUE_STRUCT -{ - UNSIGNED words[NU_QUEUE_SIZE]; -} NU_QUEUE; -#else - -/* Define queue control data structure with the actual internal data - structure. */ -typedef QU_QCB NU_QUEUE; -#endif - - -#ifndef NU_DEBUG - -/* Define pipe control data structure with all internal information - hidden. */ -typedef struct NU_PIPE_STRUCT -{ - UNSIGNED words[NU_PIPE_SIZE]; -} NU_PIPE; -#else - -/* Define pipe control data structure with the actual internal data - structure. */ -typedef PI_PCB NU_PIPE; -#endif - - -#ifndef NU_DEBUG - -/* Define semaphore control data structure with all internal information - hidden. */ -typedef struct NU_SEMAPHORE_STRUCT -{ - UNSIGNED words[NU_SEMAPHORE_SIZE]; -} NU_SEMAPHORE; -#else - -/* Define semaphore control data structure with the actual internal data - structure. */ -typedef SM_SCB NU_SEMAPHORE; -#endif - - -#ifndef NU_DEBUG - -/* Define event group control data structure with all internal information - hidden. */ -typedef struct NU_EVENT_GROUP_STRUCT -{ - UNSIGNED words[NU_EVENT_GROUP_SIZE]; -} NU_EVENT_GROUP; -#else - -/* Define event group control data structure with the actual internal data - structure. */ -typedef EV_GCB NU_EVENT_GROUP; -#endif - - -#ifndef NU_DEBUG - -/* Define partition pool control data structure with all internal - information hidden. */ -typedef struct NU_PARTITION_POOL_STRUCT -{ - UNSIGNED words[NU_PARTITION_POOL_SIZE]; -} NU_PARTITION_POOL; -#else - -/* Define partition pool control data structure with the actual internal - data structure. */ -typedef PM_PCB NU_PARTITION_POOL; -#endif - - -#ifndef NU_DEBUG - -/* Define memory pool control data structure with all internal information - hidden. */ -typedef struct NU_MEMORY_POOL_STRUCT -{ - UNSIGNED words[NU_MEMORY_POOL_SIZE]; -} NU_MEMORY_POOL; -#else - -/* Define memory pool control data structure with the actual internal data - structure. */ -typedef DM_PCB NU_MEMORY_POOL; -#endif - - -#ifndef NU_DEBUG - -/* Define timer control data structure with all internal information - hidden. */ -typedef struct NU_TIMER_STRUCT -{ - UNSIGNED words[NU_TIMER_SIZE]; -} NU_TIMER; -#else - -/* Define timer control data structure with the actual internal data - structure. */ -typedef TM_APP_TCB NU_TIMER; -#endif - - -#ifndef NU_DEBUG - -/* Define protect control data structure with all internal information - hidden. */ -typedef struct NU_PROTECT_STRUCT -{ - UNSIGNED words[NU_PROTECT_SIZE]; -} NU_PROTECT; -#else - -/* Define protect control data structure with the actual internal data - structure. */ -typedef TC_PROTECT NU_PROTECT; -#endif - - - -/* Define I/O driver request structures. */ - -struct NU_INITIALIZE_STRUCT -{ - VOID *nu_io_address; /* Base IO address */ - UNSIGNED nu_logical_units; /* Number of logical units */ - VOID *nu_memory; /* Generic memory pointer */ - INT nu_vector; /* Interrupt vector number */ -}; - -struct NU_ASSIGN_STRUCT -{ - UNSIGNED nu_logical_unit; /* Logical unit number */ - INT nu_assign_info; /* Additional assign info */ -}; - -struct NU_RELEASE_STRUCT -{ - UNSIGNED nu_logical_unit; /* Logical unit number */ - INT nu_release_info; /* Additional release info */ -}; - -struct NU_INPUT_STRUCT -{ - UNSIGNED nu_logical_unit; /* Logical unit number */ - UNSIGNED nu_offset; /* Offset of input */ - UNSIGNED nu_request_size; /* Requested input size */ - UNSIGNED nu_actual_size; /* Actual input size */ - VOID *nu_buffer_ptr; /* Input buffer pointer */ -}; - -struct NU_OUTPUT_STRUCT -{ - UNSIGNED nu_logical_unit; /* Logical unit number */ - UNSIGNED nu_offset; /* Offset of output */ - UNSIGNED nu_request_size; /* Requested output size */ - UNSIGNED nu_actual_size; /* Actual output size */ - VOID *nu_buffer_ptr; /* Output buffer pointer */ -}; - -struct NU_STATUS_STRUCT -{ - UNSIGNED nu_logical_unit; /* Logical unit number */ - VOID *nu_extra_status; /* Additional status ptr */ -}; - -struct NU_TERMINATE_STRUCT -{ - UNSIGNED nu_logical_unit; /* Logical unit number */ -}; - - -typedef struct NU_DRIVER_REQUEST_STRUCT -{ - INT nu_function; /* I/O request function */ - UNSIGNED nu_timeout; /* Timeout on request */ - STATUS nu_status; /* Status of request */ - UNSIGNED nu_supplemental; /* Supplemental information */ - VOID *nu_supplemental_ptr; /* Supplemental info pointer*/ - - /* Define a union of all the different types of request structures. */ - union NU_REQUEST_INFO_UNION - { - struct NU_INITIALIZE_STRUCT nu_initialize; - struct NU_ASSIGN_STRUCT nu_assign; - struct NU_RELEASE_STRUCT nu_release; - struct NU_INPUT_STRUCT nu_input; - struct NU_OUTPUT_STRUCT nu_output; - struct NU_STATUS_STRUCT nu_status; - struct NU_TERMINATE_STRUCT nu_terminate; - } nu_request_info; - -} NU_DRIVER_REQUEST; - -typedef struct NU_DRIVER_STRUCT -{ - UNSIGNED words[NU_DRIVER_SIZE]; - CHAR nu_driver_name[NU_MAX_NAME]; - VOID *nu_info_ptr; - UNSIGNED nu_driver_id; - VOID (*nu_driver_entry)(struct NU_DRIVER_STRUCT *, - NU_DRIVER_REQUEST *); -} NU_DRIVER; - - - -/* Define Nucleus PLUS system interfaces. */ - -VOID Application_Initialize(VOID *first_available_memory); - - -/* The following area is only applicable to application files and is skipped - during compilation of Nucleus PLUS source files. */ -#ifndef NU_SOURCE_FILE - -/* Re-map task control functions depending on whether or not error checking - is specified. */ -#ifdef NU_NO_ERROR_CHECKING -#define NU_Create_Task TCC_Create_Task -#define NU_Delete_Task TCC_Delete_Task -#define NU_Reset_Task TCC_Reset_Task -#define NU_Terminate_Task TCC_Terminate_Task -#define NU_Resume_Task TCC_Resume_Service -#define NU_Suspend_Task TCC_Suspend_Service -#define NU_Relinquish TCC_Relinquish -#define NU_Sleep TCC_Task_Sleep -#define NU_Change_Priority TCS_Change_Priority -#define NU_Change_Preemption TCS_Change_Preemption -#define NU_Change_Time_Slice TCS_Change_Time_Slice -#define NU_Check_Stack TCT_Check_Stack -#define NU_Current_Task_Pointer TCC_Current_Task_Pointer -#define NU_Established_Tasks TCF_Established_Tasks -#define NU_Task_Information TCF_Task_Information -#define NU_Task_Pointers TCF_Task_Pointers -#define NU_Create_Mailbox MBC_Create_Mailbox -#define NU_Delete_Mailbox MBC_Delete_Mailbox -#define NU_Reset_Mailbox MBS_Reset_Mailbox -#define NU_Send_To_Mailbox MBC_Send_To_Mailbox -#define NU_Broadcast_To_Mailbox MBS_Broadcast_To_Mailbox -#define NU_Receive_From_Mailbox MBC_Receive_From_Mailbox -#define NU_Established_Mailboxes MBF_Established_Mailboxes -#define NU_Mailbox_Information MBF_Mailbox_Information -#define NU_Mailbox_Pointers MBF_Mailbox_Pointers -#define NU_Create_Queue QUC_Create_Queue -#define NU_Delete_Queue QUC_Delete_Queue -#define NU_Reset_Queue QUS_Reset_Queue -#define NU_Send_To_Front_Of_Queue QUS_Send_To_Front_Of_Queue -#define NU_Send_To_Queue QUC_Send_To_Queue -#define NU_Broadcast_To_Queue QUS_Broadcast_To_Queue -#define NU_Receive_From_Queue QUC_Receive_From_Queue -#define NU_Established_Queues QUF_Established_Queues -#define NU_Queue_Information QUF_Queue_Information -#define NU_Queue_Pointers QUF_Queue_Pointers -#define NU_Create_Pipe PIC_Create_Pipe -#define NU_Delete_Pipe PIC_Delete_Pipe -#define NU_Reset_Pipe PIS_Reset_Pipe -#define NU_Send_To_Front_Of_Pipe PIS_Send_To_Front_Of_Pipe -#define NU_Send_To_Pipe PIC_Send_To_Pipe -#define NU_Broadcast_To_Pipe PIS_Broadcast_To_Pipe -#define NU_Receive_From_Pipe PIC_Receive_From_Pipe -#define NU_Established_Pipes PIF_Established_Pipes -#define NU_Pipe_Information PIF_Pipe_Information -#define NU_Pipe_Pointers PIF_Pipe_Pointers -#define NU_Create_Semaphore SMC_Create_Semaphore -#define NU_Delete_Semaphore SMC_Delete_Semaphore -#define NU_Reset_Semaphore SMS_Reset_Semaphore -#define NU_Obtain_Semaphore SMC_Obtain_Semaphore -#define NU_Release_Semaphore SMC_Release_Semaphore -#define NU_Established_Semaphores SMF_Established_Semaphores -#define NU_Semaphore_Information SMF_Semaphore_Information -#define NU_Semaphore_Pointers SMF_Semaphore_Pointers -#define NU_Create_Event_Group EVC_Create_Event_Group -#define NU_Delete_Event_Group EVC_Delete_Event_Group -#define NU_Set_Events EVC_Set_Events -#define NU_Retrieve_Events EVC_Retrieve_Events -#define NU_Established_Event_Groups EVF_Established_Event_Groups -#define NU_Event_Group_Information EVF_Event_Group_Information -#define NU_Event_Group_Pointers EVF_Event_Group_Pointers -#define NU_Create_Partition_Pool PMC_Create_Partition_Pool -#define NU_Delete_Partition_Pool PMC_Delete_Partition_Pool -#define NU_Allocate_Partition PMC_Allocate_Partition -#define NU_Deallocate_Partition PMC_Deallocate_Partition -#define NU_Established_Partition_Pools PMF_Established_Partition_Pools -#define NU_Partition_Pool_Information PMF_Partition_Pool_Information -#define NU_Partition_Pool_Pointers PMF_Partition_Pool_Pointers -#define NU_Create_Memory_Pool DMC_Create_Memory_Pool -#define NU_Delete_Memory_Pool DMC_Delete_Memory_Pool -#define NU_Allocate_Memory DMC_Allocate_Memory -#define NU_Deallocate_Memory DMC_Deallocate_Memory -#define NU_Established_Memory_Pools DMF_Established_Memory_Pools -#define NU_Memory_Pool_Information DMF_Memory_Pool_Information -#define NU_Memory_Pool_Pointers DMF_Memory_Pool_Pointers -#define NU_Control_Signals TCS_Control_Signals -#define NU_Receive_Signals TCS_Receive_Signals -#define NU_Register_Signal_Handler TCS_Register_Signal_Handler -#define NU_Send_Signals TCS_Send_Signals -#define NU_Setup_Vector INT_Setup_Vector -#define NU_Register_LISR TCC_Register_LISR -#define NU_Activate_HISR TCT_Activate_HISR -#define NU_Create_HISR TCC_Create_HISR -#define NU_Delete_HISR TCC_Delete_HISR -#define NU_Current_HISR_Pointer TCC_Current_HISR_Pointer -#define NU_Established_HISRs TCF_Established_HISRs -#define NU_HISR_Pointers TCF_HISR_Pointers -#define NU_HISR_Information TCF_HISR_Information -#define NU_Protect TCT_Protect -#define NU_Unprotect TCT_Unprotect -#define NU_Control_Interrupts TCT_Control_Interrupts -#define NU_Local_Control_Interrupts TCT_Local_Control_Interrupts -#define NU_Restore_Interrupts TCT_Restore_Interrupts -#define NU_Set_Clock TMT_Set_Clock -#define NU_Retrieve_Clock TMT_Retrieve_Clock -#define NU_Create_Timer TMS_Create_Timer -#define NU_Delete_Timer TMS_Delete_Timer -#define NU_Control_Timer TMS_Control_Timer -#define NU_Reset_Timer TMS_Reset_Timer -#define NU_Established_Timers TMF_Established_Timers -#define NU_Timer_Pointers TMF_Timer_Pointers -#define NU_Timer_Information TMF_Timer_Information -#define NU_Release_Information RLC_Release_Information -#define NU_License_Information LIC_License_Information -#define NU_Disable_History_Saving HIC_Disable_History_Saving -#define NU_Enable_History_Saving HIC_Enable_History_Saving -#define NU_Make_History_Entry HIC_Make_History_Entry_Service -#define NU_Retrieve_History_Entry HIC_Retrieve_History_Entry -#define NU_Create_Driver IOC_Create_Driver -#define NU_Delete_Driver IOC_Delete_Driver -#define NU_Request_Driver IOC_Request_Driver -#define NU_Resume_Driver IOC_Resume_Driver -#define NU_Suspend_Driver IOC_Suspend_Driver -#define NU_Established_Drivers IOF_Established_Drivers -#define NU_Driver_Pointers IOF_Driver_Pointers -#else -#define NU_Create_Task TCCE_Create_Task -#define NU_Delete_Task TCCE_Delete_Task -#define NU_Reset_Task TCCE_Reset_Task -#define NU_Terminate_Task TCCE_Terminate_Task -#define NU_Resume_Task TCCE_Resume_Service -#define NU_Suspend_Task TCCE_Suspend_Service -#define NU_Relinquish TCCE_Relinquish -#define NU_Sleep TCCE_Task_Sleep -#define NU_Change_Priority TCSE_Change_Priority -#define NU_Change_Preemption TCSE_Change_Preemption -#define NU_Change_Time_Slice TCSE_Change_Time_Slice -#define NU_Check_Stack TCT_Check_Stack -#define NU_Current_Task_Pointer TCC_Current_Task_Pointer -#define NU_Established_Tasks TCF_Established_Tasks -#define NU_Task_Information TCF_Task_Information -#define NU_Task_Pointers TCF_Task_Pointers -#define NU_Create_Mailbox MBCE_Create_Mailbox -#define NU_Delete_Mailbox MBCE_Delete_Mailbox -#define NU_Reset_Mailbox MBSE_Reset_Mailbox -#define NU_Send_To_Mailbox MBCE_Send_To_Mailbox -#define NU_Broadcast_To_Mailbox MBSE_Broadcast_To_Mailbox -#define NU_Receive_From_Mailbox MBCE_Receive_From_Mailbox -#define NU_Established_Mailboxes MBF_Established_Mailboxes -#define NU_Mailbox_Information MBF_Mailbox_Information -#define NU_Mailbox_Pointers MBF_Mailbox_Pointers -#define NU_Create_Queue QUCE_Create_Queue -#define NU_Delete_Queue QUCE_Delete_Queue -#define NU_Reset_Queue QUSE_Reset_Queue -#define NU_Send_To_Queue QUCE_Send_To_Queue -#define NU_Send_To_Front_Of_Queue QUSE_Send_To_Front_Of_Queue -#define NU_Broadcast_To_Queue QUSE_Broadcast_To_Queue -#define NU_Receive_From_Queue QUCE_Receive_From_Queue -#define NU_Established_Queues QUF_Established_Queues -#define NU_Queue_Information QUF_Queue_Information -#define NU_Queue_Pointers QUF_Queue_Pointers -#define NU_Create_Pipe PICE_Create_Pipe -#define NU_Delete_Pipe PICE_Delete_Pipe -#define NU_Reset_Pipe PISE_Reset_Pipe -#define NU_Send_To_Front_Of_Pipe PISE_Send_To_Front_Of_Pipe -#define NU_Send_To_Pipe PICE_Send_To_Pipe -#define NU_Broadcast_To_Pipe PISE_Broadcast_To_Pipe -#define NU_Receive_From_Pipe PICE_Receive_From_Pipe -#define NU_Established_Pipes PIF_Established_Pipes -#define NU_Pipe_Information PIF_Pipe_Information -#define NU_Pipe_Pointers PIF_Pipe_Pointers -#define NU_Create_Semaphore SMCE_Create_Semaphore -#define NU_Delete_Semaphore SMCE_Delete_Semaphore -#define NU_Reset_Semaphore SMSE_Reset_Semaphore -#define NU_Obtain_Semaphore SMCE_Obtain_Semaphore -#define NU_Release_Semaphore SMCE_Release_Semaphore -#define NU_Established_Semaphores SMF_Established_Semaphores -#define NU_Semaphore_Information SMF_Semaphore_Information -#define NU_Semaphore_Pointers SMF_Semaphore_Pointers -#define NU_Create_Event_Group EVCE_Create_Event_Group -#define NU_Delete_Event_Group EVCE_Delete_Event_Group -#define NU_Set_Events EVCE_Set_Events -#define NU_Retrieve_Events EVCE_Retrieve_Events -#define NU_Established_Event_Groups EVF_Established_Event_Groups -#define NU_Event_Group_Information EVF_Event_Group_Information -#define NU_Event_Group_Pointers EVF_Event_Group_Pointers -#define NU_Create_Partition_Pool PMCE_Create_Partition_Pool -#define NU_Delete_Partition_Pool PMCE_Delete_Partition_Pool -#define NU_Allocate_Partition PMCE_Allocate_Partition -#define NU_Deallocate_Partition PMCE_Deallocate_Partition -#define NU_Established_Partition_Pools PMF_Established_Partition_Pools -#define NU_Partition_Pool_Information PMF_Partition_Pool_Information -#define NU_Partition_Pool_Pointers PMF_Partition_Pool_Pointers -#define NU_Create_Memory_Pool DMCE_Create_Memory_Pool -#define NU_Delete_Memory_Pool DMCE_Delete_Memory_Pool -#define NU_Allocate_Memory DMCE_Allocate_Memory -#define NU_Deallocate_Memory DMCE_Deallocate_Memory -#define NU_Established_Memory_Pools DMF_Established_Memory_Pools -#define NU_Memory_Pool_Information DMF_Memory_Pool_Information -#define NU_Memory_Pool_Pointers DMF_Memory_Pool_Pointers -#define NU_Control_Signals TCSE_Control_Signals -#define NU_Receive_Signals TCSE_Receive_Signals -#define NU_Register_Signal_Handler TCSE_Register_Signal_Handler -#define NU_Send_Signals TCSE_Send_Signals -#define NU_Setup_Vector INT_Setup_Vector -#define NU_Register_LISR TCC_Register_LISR -#define NU_Activate_HISR TCCE_Activate_HISR -#define NU_Create_HISR TCCE_Create_HISR -#define NU_Delete_HISR TCCE_Delete_HISR -#define NU_Current_HISR_Pointer TCF_Current_HISR_Pointer -#define NU_Established_HISRs TCF_Established_HISRs -#define NU_HISR_Pointers TCF_HISR_Pointers -#define NU_HISR_Information TCF_HISR_Information -#define NU_Protect TCT_Protect -#define NU_Unprotect TCT_Unprotect -#define NU_Control_Interrupts TCT_Control_Interrupts -#define NU_Local_Control_Interrupts TCT_Local_Control_Interrupts -#define NU_Restore_Interrupts TCT_Restore_Interrupts -#define NU_Set_Clock TMT_Set_Clock -#define NU_Retrieve_Clock TMT_Retrieve_Clock -#define NU_Create_Timer TMSE_Create_Timer -#define NU_Delete_Timer TMSE_Delete_Timer -#define NU_Control_Timer TMSE_Control_Timer -#define NU_Reset_Timer TMSE_Reset_Timer -#define NU_Established_Timers TMF_Established_Timers -#define NU_Timer_Pointers TMF_Timer_Pointers -#define NU_Timer_Information TMF_Timer_Information -#define NU_Release_Information RLC_Release_Information -#define NU_License_Information LIC_License_Information -#define NU_Disable_History_Saving HIC_Disable_History_Saving -#define NU_Enable_History_Saving HIC_Enable_History_Saving -#define NU_Make_History_Entry HIC_Make_History_Entry_Service -#define NU_Retrieve_History_Entry HIC_Retrieve_History_Entry -#define NU_Create_Driver IOCE_Create_Driver -#define NU_Delete_Driver IOCE_Delete_Driver -#define NU_Request_Driver IOCE_Request_Driver -#define NU_Resume_Driver IOCE_Resume_Driver -#define NU_Suspend_Driver IOCE_Suspend_Driver -#define NU_Established_Drivers IOF_Established_Drivers -#define NU_Driver_Pointers IOF_Driver_Pointers -#endif - - -/* Define task control functions. */ - -STATUS NU_Create_Task(NU_TASK *task, CHAR *name, - VOID (*task_entry)(UNSIGNED, VOID *), UNSIGNED argc, - VOID *argv, VOID *stack_address, UNSIGNED stack_size, - OPTION priority, UNSIGNED time_slice, - OPTION preempt, OPTION auto_start); -STATUS NU_Delete_Task(NU_TASK *task); -STATUS NU_Reset_Task(NU_TASK *task, UNSIGNED argc, VOID *argv); -STATUS NU_Terminate_Task(NU_TASK *task); -STATUS NU_Resume_Task(NU_TASK *task); -STATUS NU_Suspend_Task(NU_TASK *task); -VOID NU_Relinquish(VOID); -VOID NU_Sleep(UNSIGNED ticks); -OPTION NU_Change_Priority(NU_TASK *task, OPTION new_priority); -OPTION NU_Change_Preemption(OPTION preempt); -UNSIGNED NU_Change_Time_Slice(NU_TASK *task, UNSIGNED time_slice); -UNSIGNED NU_Check_Stack(VOID); -NU_TASK *NU_Current_Task_Pointer(VOID); -UNSIGNED NU_Established_Tasks(VOID); -STATUS NU_Task_Information(NU_TASK *task, CHAR *name, - DATA_ELEMENT *status, UNSIGNED *scheduled_count, - OPTION *priority, OPTION *preempt, - UNSIGNED *time_slice, VOID **stack_base, - UNSIGNED *stack_size, UNSIGNED *minimum_stack); -UNSIGNED NU_Task_Pointers(NU_TASK **pointer_list, - UNSIGNED maximum_pointers); - -/* Define Mailbox management functions. */ - -STATUS NU_Create_Mailbox(NU_MAILBOX *mailbox, CHAR *name, - OPTION suspend_type); -STATUS NU_Delete_Mailbox(NU_MAILBOX *mailbox); -STATUS NU_Reset_Mailbox(NU_MAILBOX *mailbox); -STATUS NU_Send_To_Mailbox(NU_MAILBOX *mailbox, VOID *message, - UNSIGNED suspend); -STATUS NU_Broadcast_To_Mailbox(NU_MAILBOX *mailbox, VOID *message, - UNSIGNED suspend); -STATUS NU_Receive_From_Mailbox(NU_MAILBOX *mailbox, VOID *message, - UNSIGNED suspend); -UNSIGNED NU_Established_Mailboxes(VOID); -STATUS NU_Mailbox_Information(NU_MAILBOX *mailbox, CHAR *name, - OPTION *suspend_type, OPTION *message_present, - UNSIGNED *tasks_waiting, NU_TASK **first_task); -UNSIGNED MBC_Mailbox_Pointers(NU_MAILBOX **pointer_list, - UNSIGNED maximum_pointers); - -/* Define Queue management functions. */ - -STATUS NU_Create_Queue(NU_QUEUE *queue, CHAR *name, - VOID *start_address, UNSIGNED queue_size, - OPTION message_type, UNSIGNED message_size, - OPTION suspend_type); -STATUS NU_Delete_Queue(NU_QUEUE *queue); -STATUS NU_Reset_Queue(NU_QUEUE *queue); -STATUS NU_Send_To_Front_Of_Queue(NU_QUEUE *queue, VOID *message, - UNSIGNED size, UNSIGNED suspend); -STATUS NU_Send_To_Queue(NU_QUEUE *queue, VOID *message, - UNSIGNED size, UNSIGNED suspend); -STATUS NU_Broadcast_To_Queue(NU_QUEUE *queue, VOID *message, - UNSIGNED size, UNSIGNED suspend); -STATUS NU_Receive_From_Queue(NU_QUEUE *queue, VOID *message, - UNSIGNED size, UNSIGNED *actual_size, UNSIGNED suspend); -UNSIGNED NU_Established_Queues(VOID); -STATUS NU_Queue_Information(NU_QUEUE *queue, CHAR *name, - VOID **start_address, UNSIGNED *queue_size, - UNSIGNED *available, UNSIGNED *messages, - OPTION *message_type, UNSIGNED *message_size, - OPTION *suspend_type, UNSIGNED *tasks_waiting, - NU_TASK **first_task); -UNSIGNED NU_Queue_Pointers(NU_QUEUE **pointer_list, - UNSIGNED maximum_pointers); - -/* Define Pipe management functions. */ - -STATUS NU_Create_Pipe(NU_PIPE *pipe, CHAR *name, - VOID *start_address, UNSIGNED pipe_size, - OPTION message_type, UNSIGNED message_size, - OPTION suspend_type); -STATUS NU_Delete_Pipe(NU_PIPE *pipe); -STATUS NU_Reset_Pipe(NU_PIPE *pipe); -STATUS NU_Send_To_Front_Of_Pipe(NU_PIPE *pipe, VOID *message, - UNSIGNED size, UNSIGNED suspend); -STATUS NU_Send_To_Pipe(NU_PIPE *pipe, VOID *message, - UNSIGNED size, UNSIGNED suspend); -STATUS NU_Broadcast_To_Pipe(NU_PIPE *pipe, VOID *message, - UNSIGNED size, UNSIGNED suspend); -STATUS NU_Receive_From_Pipe(NU_PIPE *pipe, VOID *message, - UNSIGNED size, UNSIGNED *actual_size, UNSIGNED suspend); -UNSIGNED NU_Established_Pipes(VOID); -STATUS NU_Pipe_Information(NU_PIPE *pipe, CHAR *name, - VOID **start_address, UNSIGNED *pipe_size, - UNSIGNED *available, UNSIGNED *messages, - OPTION *message_type, UNSIGNED *message_size, - OPTION *suspend_type, UNSIGNED *tasks_waiting, - NU_TASK **first_task); -UNSIGNED NU_Pipe_Pointers(NU_PIPE **pointer_list, - UNSIGNED maximum_pointers); - -/* Define Semaphore management functions. */ - -STATUS NU_Create_Semaphore(NU_SEMAPHORE *semaphore, CHAR *name, - UNSIGNED initial_count, OPTION suspend_type); -STATUS NU_Delete_Semaphore(NU_SEMAPHORE *semaphore); -STATUS NU_Reset_Semaphore(NU_SEMAPHORE *semaphore, - UNSIGNED initial_count); -STATUS NU_Obtain_Semaphore(NU_SEMAPHORE *semaphore, UNSIGNED suspend); -STATUS NU_Release_Semaphore(NU_SEMAPHORE *semaphore); -UNSIGNED NU_Established_Semaphores(VOID); -STATUS NU_Semaphore_Information(NU_SEMAPHORE *semaphore, CHAR *name, - UNSIGNED *current_count, OPTION *suspend_type, - UNSIGNED *tasks_waiting, NU_TASK **first_task); -UNSIGNED NU_Semaphore_Pointers(NU_SEMAPHORE **pointer_list, - UNSIGNED maximum_pointers); - -/* Define Event Group management functions. */ - -STATUS NU_Create_Event_Group(NU_EVENT_GROUP *group, CHAR *name); -STATUS NU_Delete_Event_Group(NU_EVENT_GROUP *group); -STATUS NU_Set_Events(NU_EVENT_GROUP *group, UNSIGNED events, - OPTION operation); -STATUS NU_Retrieve_Events(NU_EVENT_GROUP *group, - UNSIGNED requested_flags, OPTION operation, - UNSIGNED *retrieved_flags, UNSIGNED suspend); -UNSIGNED NU_Established_Event_Groups(VOID); -STATUS NU_Event_Group_Information(NU_EVENT_GROUP *group, CHAR *name, - UNSIGNED *event_flags, UNSIGNED *tasks_waiting, - NU_TASK **first_task); -UNSIGNED NU_Event_Group_Pointers(NU_EVENT_GROUP **pointer_list, - UNSIGNED maximum_pointers); - -/* Define Signal processing functions. */ - -UNSIGNED NU_Control_Signals(UNSIGNED signal_enable_mask); -UNSIGNED NU_Receive_Signals(VOID); -STATUS NU_Register_Signal_Handler(VOID (*signal_handler)(UNSIGNED)); -STATUS NU_Send_Signals(NU_TASK *task, UNSIGNED signals); - -/* Define Partition memory management functions. */ - -STATUS NU_Create_Partition_Pool(NU_PARTITION_POOL *pool, CHAR *name, - VOID *start_address, UNSIGNED pool_size, - UNSIGNED partition_size, OPTION suspend_type); -STATUS NU_Delete_Partition_Pool(NU_PARTITION_POOL *pool); -STATUS NU_Allocate_Partition(NU_PARTITION_POOL *pool, - VOID **return_pointer, UNSIGNED suspend); -STATUS NU_Deallocate_Partition(VOID *partition); -UNSIGNED NU_Established_Partition_Pools(VOID); -STATUS NU_Partition_Pool_Information(NU_PARTITION_POOL *pool, - CHAR *name, - VOID **start_address, UNSIGNED *pool_size, - UNSIGNED *partition_size, UNSIGNED *available, - UNSIGNED *allocated, OPTION *suspend_type, - UNSIGNED *tasks_waiting, NU_TASK **first_task); -UNSIGNED NU_Partition_Pool_Pointers(NU_PARTITION_POOL **pointer_list, - UNSIGNED maximum_pointers); - -/* Define Dynamic memory management functions. */ - -STATUS NU_Create_Memory_Pool(NU_MEMORY_POOL *pool, CHAR *name, - VOID *start_address, UNSIGNED pool_size, - UNSIGNED min_allocation, OPTION suspend_type); -STATUS NU_Delete_Memory_Pool(NU_MEMORY_POOL *pool); -STATUS NU_Allocate_Memory(NU_MEMORY_POOL *pool, VOID **return_pointer, - UNSIGNED size, UNSIGNED suspend); -STATUS NU_Deallocate_Memory(VOID *memory); -UNSIGNED NU_Established_Memory_Pools(VOID); -STATUS NU_Memory_Pool_Information(NU_MEMORY_POOL *pool, CHAR *name, - VOID **start_address, UNSIGNED *pool_size, - UNSIGNED *min_allocation, UNSIGNED *available, - OPTION *suspend_type, UNSIGNED *tasks_waiting, - NU_TASK **first_task); -UNSIGNED NU_Memory_Pool_Pointers(NU_MEMORY_POOL **pointer_list, - UNSIGNED maximum_pointers); - -/* Define Interrupt management functions. */ - -INT NU_Control_Interrupts(INT new_level); -INT NU_Local_Control_Interrupts(INT new_level); -VOID NU_Restore_Interrupts(VOID); -VOID *NU_Setup_Vector(INT vector, VOID *new_vector); -STATUS NU_Register_LISR(INT vector, - VOID (*new_lisr)(INT), - VOID (**old_lisr)(INT)); -STATUS NU_Activate_HISR(NU_HISR *hisr); -STATUS NU_Create_HISR(NU_HISR *hisr, CHAR *name, - VOID (*hisr_entry)(VOID), OPTION priority, - VOID *stack_address, UNSIGNED stack_size); -STATUS NU_Delete_HISR(NU_HISR *hisr); -NU_HISR *NU_Current_HISR_Pointer(VOID); -UNSIGNED NU_Established_HISRs(VOID); -STATUS NU_HISR_Information(NU_HISR *hisr, CHAR *name, - UNSIGNED *scheduled_count, DATA_ELEMENT *priority, - VOID **stack_base, UNSIGNED *stack_size, - UNSIGNED *minimum_stack); -UNSIGNED NU_HISR_Pointers(NU_HISR **pointer_list, - UNSIGNED maximum_pointers); -VOID NU_Protect(NU_PROTECT *protect_struct); -VOID NU_Unprotect(VOID); - -/* Timer management functions. */ - -STATUS NU_Create_Timer(NU_TIMER *timer, CHAR *name, - VOID (*expiration_routine)(UNSIGNED), UNSIGNED id, - UNSIGNED initial_time, UNSIGNED reschedule_time, - OPTION enable); -STATUS NU_Delete_Timer(NU_TIMER *timer); -STATUS NU_Reset_Timer(NU_TIMER *timer, - VOID (*expiration_routine)(UNSIGNED), - UNSIGNED initial_time, UNSIGNED reschedule_timer, - OPTION enable); -STATUS NU_Control_Timer(NU_TIMER *timer, OPTION enable); -UNSIGNED NU_Established_Timers(VOID); -STATUS NU_Timer_Information(NU_TIMER *timer, CHAR *name, - OPTION *enable, UNSIGNED *expirations, UNSIGNED *id, - UNSIGNED *initial_time, UNSIGNED *reschedule_time); -UNSIGNED NU_Timer_Pointers(NU_TIMER **pointer_list, - UNSIGNED maximum_pointers); -VOID NU_Set_Clock(UNSIGNED new_value); -UNSIGNED NU_Retrieve_Clock(VOID); - -/* Development support functions. */ - -CHAR *NU_Release_Information(VOID); -CHAR *NU_License_Information(VOID); -VOID NU_Disable_History_Saving(VOID); -VOID NU_Enable_History_Saving(VOID); -VOID NU_Make_History_Entry(UNSIGNED param1, UNSIGNED param2, - UNSIGNED param3); -STATUS NU_Retrieve_History_Entry(DATA_ELEMENT *id, - UNSIGNED *param1, UNSIGNED *param2, UNSIGNED *param3, - UNSIGNED *time, NU_TASK **task, NU_HISR **hisr); - -/* Input/Output Driver functions. */ - -STATUS NU_Create_Driver(NU_DRIVER *driver, CHAR *name, - VOID (*driver_entry)(NU_DRIVER *, NU_DRIVER_REQUEST *)); -STATUS NU_Delete_Driver(NU_DRIVER *driver); -STATUS NU_Request_Driver(NU_DRIVER *driver, - NU_DRIVER_REQUEST *request); -STATUS NU_Resume_Driver(NU_TASK *task); -STATUS NU_Suspend_Driver(VOID (*terminate_routine)(VOID *), - VOID *information, UNSIGNED timeout); -UNSIGNED NU_Established_Drivers(VOID); -UNSIGNED NU_Driver_Pointers(NU_DRIVER **pointer_list, - UNSIGNED maximum_pointers); - -#endif - -#ifdef __cplusplus -} /* End of C declarations */ -#endif - -#endif /* !NUCLEUS */ - diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/cs_defs.h --- a/src/gpf/inc/nuc/cs_defs.h Sun Jul 15 20:57:33 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/*************************************************************************/ -/* */ -/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ -/* */ -/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ -/* subject matter of this material. All manufacturing, reproduction, */ -/* use, and sales rights pertaining to this subject matter are governed */ -/* by the license agreement. The recipient of this software implicitly */ -/* accepts the terms of the license. */ -/* */ -/*************************************************************************/ - -/*************************************************************************/ -/* */ -/* FILE NAME VERSION */ -/* */ -/* cs_defs.h PLUS 1.2 */ -/* */ -/* COMPONENT */ -/* */ -/* CS - Common Services */ -/* */ -/* DESCRIPTION */ -/* */ -/* This file contains data structure definitions used in the common */ -/* service linked list routines. */ -/* */ -/* AUTHOR */ -/* */ -/* William E. Lamie, Accelerated Technology, Inc. */ -/* */ -/* DATA STRUCTURES */ -/* */ -/* CS_NODE Link node structure */ -/* */ -/* FUNCTIONS */ -/* */ -/* None */ -/* */ -/* DEPENDENCIES */ -/* */ -/* nucleus.h Nucleus PLUS constants */ -/* */ -/* HISTORY */ -/* */ -/* NAME DATE REMARKS */ -/* */ -/* W. Lamie 03-01-1993 Created initial version 1.0 */ -/* D. Lamie 04-19-1993 Verified version 1.0 */ -/* W. Lamie 06-01-1993 Added padding conditional into */ -/* CS_NODE structure, making */ -/* version 1.0a */ -/* D. Lamie 06-01-1993 Verified version 1.0a */ -/* W. Lamie 03-01-1994 Moved include files outside of */ -/* the file #ifndef to allow the */ -/* use of actual data structures, */ -/* resulting in version 1.1 */ -/* R. Pfaff - */ -/* D. Lamie 03-18-1994 Verified version 1.1 */ -/* M.Q. Qian 04-17-1996 updated to version 1.2 */ -/* */ -/*************************************************************************/ - -#include "nucleus.h" /* Include Nucleus constants */ - - -/* Check to see if the file has been included already. */ -#ifndef CS_DEFS -#define CS_DEFS - - -/* Define a common node data structure that can be included inside of - other system data structures. */ - -typedef struct CS_NODE_STRUCT -{ - struct CS_NODE_STRUCT *cs_previous; - struct CS_NODE_STRUCT *cs_next; - DATA_ELEMENT cs_priority; - -#if PAD_1 - DATA_ELEMENT cs_padding[PAD_1]; -#endif - -} CS_NODE; - -#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/dm_defs.h --- a/src/gpf/inc/nuc/dm_defs.h Sun Jul 15 20:57:33 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,141 +0,0 @@ -/*************************************************************************/ -/* */ -/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ -/* */ -/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ -/* subject matter of this material. All manufacturing, reproduction, */ -/* use, and sales rights pertaining to this subject matter are governed */ -/* by the license agreement. The recipient of this software implicitly */ -/* accepts the terms of the license. */ -/* */ -/*************************************************************************/ - -/*************************************************************************/ -/* */ -/* FILE NAME VERSION */ -/* */ -/* dm_defs.h PLUS 1.2a */ -/* */ -/* COMPONENT */ -/* */ -/* DM - Dynamic Memory Management */ -/* */ -/* DESCRIPTION */ -/* */ -/* This file contains data structure definitions and constants for */ -/* the Dynamic Memory component. */ -/* */ -/* AUTHOR */ -/* */ -/* William E. Lamie, Accelerated Technology, Inc. */ -/* */ -/* DATA STRUCTURES */ -/* */ -/* DM_PCB Dynamic Pool control block */ -/* DM_HEADER Header of each memory block */ -/* DM_SUSPEND Memory suspension block */ -/* */ -/* FUNCTIONS */ -/* */ -/* None */ -/* */ -/* DEPENDENCIES */ -/* */ -/* cs_defs.h Common service definitions */ -/* tc_defs.h Thread Control definitions */ -/* */ -/* HISTORY */ -/* */ -/* NAME DATE REMARKS */ -/* */ -/* W. Lamie 03-01-1993 Created initial version 1.0 */ -/* D. Lamie 04-19-1993 Verified version 1.0 */ -/* W. Lamie 03-01-1994 Moved include files outside of */ -/* the file #ifndef to allow the */ -/* use of actual data structures, */ -/* added padding logic, */ -/* resulting in version 1.1 */ -/* R. Pfaff - */ -/* D. Lamie 03-18-1994 Verified version 1.1 */ -/* M.Q. Qian 04-17-1996 updated to version 1.2 */ -/* M. Trippi 01-07-1996 Added missing PAD_1 field to */ -/* DM_HEADER_STRUCT to be */ -/* consistent with other PLUS */ -/* structures creating 1.2a. */ -/* */ -/*************************************************************************/ - -#include "cs_defs.h" /* Common service constants */ -#include "tc_defs.h" /* Thread control constants */ - - -/* Check to see if the file has been included already. */ - -#ifndef DM_DEFS -#define DM_DEFS - - -/* Define constants local to this component. */ - -#define DM_DYNAMIC_ID 0x44594e41UL -#define DM_OVERHEAD ((sizeof(DM_HEADER) + sizeof(UNSIGNED) \ - - 1)/sizeof(UNSIGNED)) * \ - sizeof(UNSIGNED) - - -/* Define the Dynamic Pool Control Block data type. */ - -typedef struct DM_PCB_STRUCT -{ - CS_NODE dm_created; /* Node for linking to */ - /* created dynamic pools */ - TC_PROTECT dm_protect; /* Protection structure */ - UNSIGNED dm_id; /* Internal PCB ID */ - CHAR dm_name[NU_MAX_NAME]; /* Dynamic Pool name */ - VOID *dm_start_address; /* Starting pool address */ - UNSIGNED dm_pool_size; /* Size of pool */ - UNSIGNED dm_min_allocation; /* Minimum allocate size */ - UNSIGNED dm_available; /* Total available bytes */ - struct DM_HEADER_STRUCT - *dm_memory_list; /* Memory list */ - struct DM_HEADER_STRUCT - *dm_search_ptr; /* Search pointer */ - DATA_ELEMENT dm_fifo_suspend; /* Suspension type flag */ -#if PAD_1 - DATA_ELEMENT dm_padding[PAD_1]; -#endif - UNSIGNED dm_tasks_waiting; /* Number of waiting tasks*/ - struct DM_SUSPEND_STRUCT - *dm_suspension_list; /* Suspension list */ -} DM_PCB; - - -/* Define the header structure that is in front of each memory block. */ - -typedef struct DM_HEADER_STRUCT -{ - struct DM_HEADER_STRUCT - *dm_next_memory, /* Next memory block */ - *dm_previous_memory; /* Previous memory block */ - DATA_ELEMENT dm_memory_free; /* Memory block free flag */ -#if PAD_1 - DATA_ELEMENT dm_padding[PAD_1]; -#endif - DM_PCB *dm_memory_pool; /* Dynamic pool pointer */ -} DM_HEADER; - - -/* Define the dynamic memory suspension structure. This structure is - allocated off of the caller's stack. */ - -typedef struct DM_SUSPEND_STRUCT -{ - CS_NODE dm_suspend_link; /* Link to suspend blocks */ - DM_PCB *dm_memory_pool; /* Pointer to pool */ - UNSIGNED dm_request_size; /* Size of memory request */ - TC_TCB *dm_suspended_task; /* Task suspended */ - VOID *dm_return_pointer; /* Return memory address */ - STATUS dm_return_status; /* Return status */ -} DM_SUSPEND; - -#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/ev_defs.h --- a/src/gpf/inc/nuc/ev_defs.h Sun Jul 15 20:57:33 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/*************************************************************************/ -/* */ -/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ -/* */ -/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ -/* subject matter of this material. All manufacturing, reproduction, */ -/* use, and sales rights pertaining to this subject matter are governed */ -/* by the license agreement. The recipient of this software implicitly */ -/* accepts the terms of the license. */ -/* */ -/*************************************************************************/ - -/*************************************************************************/ -/* */ -/* FILE NAME VERSION */ -/* */ -/* ev_defs.h PLUS 1.2 */ -/* */ -/* COMPONENT */ -/* */ -/* EV - Event Group Management */ -/* */ -/* DESCRIPTION */ -/* */ -/* This file contains data structure definitions and constants for */ -/* the Event Flag Group component. */ -/* */ -/* AUTHOR */ -/* */ -/* William E. Lamie, Accelerated Technology, Inc. */ -/* */ -/* DATA STRUCTURES */ -/* */ -/* EV_GCB Event Group control block */ -/* EV_SUSPEND Event Group suspension block */ -/* */ -/* FUNCTIONS */ -/* */ -/* None */ -/* */ -/* DEPENDENCIES */ -/* */ -/* cs_defs.h Common service definitions */ -/* tc_defs.h Thread Control definitions */ -/* */ -/* HISTORY */ -/* */ -/* NAME DATE REMARKS */ -/* */ -/* W. Lamie 03-01-1993 Created initial version 1.0 */ -/* D. Lamie 04-19-1993 Verified version 1.0 */ -/* W. Lamie 03-01-1994 Moved include files outside of */ -/* the file #ifndef to allow the */ -/* use of actual data structures, */ -/* removed protect structure, */ -/* added padding logic, */ -/* resulting in version 1.1 */ -/* R. Pfaff - */ -/* D. Lamie 03-18-1994 Verified version 1.1 */ -/* M.Q. Qian 04-17-1996 updated to version 1.2 */ -/* */ -/*************************************************************************/ - -#include "cs_defs.h" /* Common service constants */ -#include "tc_defs.h" /* Thread control constants */ - - -/* Check to see if the file has been included already. */ - -#ifndef EV_DEFS -#define EV_DEFS - - -/* Define constants local to this component. */ - -#define EV_EVENT_ID 0x45564e54UL -#define EV_AND 0x2 -#define EV_CONSUME 0x1 - - -/* Define the Event Group Control Block data type. */ - -typedef struct EV_GCB_STRUCT -{ - CS_NODE ev_created; /* Node for linking to */ - /* created Events list */ - UNSIGNED ev_id; /* Internal EV ID */ - CHAR ev_name[NU_MAX_NAME]; /* Event group name */ - UNSIGNED ev_current_events; /* Current event flags */ - UNSIGNED ev_tasks_waiting; /* Number of waiting tasks*/ - struct EV_SUSPEND_STRUCT - *ev_suspension_list; /* Suspension list */ -} EV_GCB; - - -/* Define the Event Group suspension structure. This structure is allocated - off of the caller's stack. */ - -typedef struct EV_SUSPEND_STRUCT -{ - CS_NODE ev_suspend_link; /* Link to suspend blocks */ - EV_GCB *ev_event_group; /* Pointer to Event group */ - UNSIGNED ev_requested_events; /* Requested event flags */ - DATA_ELEMENT ev_operation; /* Event operation */ -#if PAD_1 - DATA_ELEMENT ev_padding[PAD_1]; -#endif - TC_TCB *ev_suspended_task; /* Task suspended */ - STATUS ev_return_status; /* Return status */ - UNSIGNED ev_actual_events; /* Event flags returned */ -} EV_SUSPEND; - -#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/mb_defs.h --- a/src/gpf/inc/nuc/mb_defs.h Sun Jul 15 20:57:33 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/*************************************************************************/ -/* */ -/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ -/* */ -/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ -/* subject matter of this material. All manufacturing, reproduction, */ -/* use, and sales rights pertaining to this subject matter are governed */ -/* by the license agreement. The recipient of this software implicitly */ -/* accepts the terms of the license. */ -/* */ -/*************************************************************************/ - -/*************************************************************************/ -/* */ -/* FILE NAME VERSION */ -/* */ -/* mb_defs.h PLUS 1.2 */ -/* */ -/* COMPONENT */ -/* */ -/* MB - Mailbox Management */ -/* */ -/* DESCRIPTION */ -/* */ -/* This file contains data structure definitions and constants for */ -/* the message Mailbox component. */ -/* */ -/* AUTHOR */ -/* */ -/* William E. Lamie, Accelerated Technology, Inc. */ -/* */ -/* DATA STRUCTURES */ -/* */ -/* MB_MCB Mailbox control block */ -/* MB_SUSPEND Mailbox suspension block */ -/* */ -/* FUNCTIONS */ -/* */ -/* None */ -/* */ -/* DEPENDENCIES */ -/* */ -/* cs_defs.h Common service definitions */ -/* tc_defs.h Thread Control definitions */ -/* */ -/* HISTORY */ -/* */ -/* NAME DATE REMARKS */ -/* */ -/* W. Lamie 03-01-1993 Created initial version 1.0 */ -/* D. Lamie 04-19-1993 Verified version 1.0 */ -/* W. Lamie 03-01-1994 Moved include files outside of */ -/* the file #ifndef to allow the */ -/* use of actual data structures, */ -/* removed protection structure */ -/* inside of each mailbox, added */ -/* padding logic, resulting in */ -/* version 1.1 */ -/* R. Pfaff - */ -/* D. Lamie 03-18-1994 Verified version 1.1 */ -/* M.Q. Qian 04-17-1996 updated to version 1.2 */ -/* */ -/*************************************************************************/ - -#include "cs_defs.h" /* Common service constants */ -#include "tc_defs.h" /* Thread control constants */ - - -/* Check to see if the file has been included already. */ - -#ifndef MB_DEFS -#define MB_DEFS - - -/* Define constants local to this component. */ - -#define MB_MAILBOX_ID 0x4d424f58UL -#define MB_MESSAGE_SIZE 4 - - -/* Define the Mailbox Control Block data type. */ - -typedef struct MB_MCB_STRUCT -{ - CS_NODE mb_created; /* Node for linking to */ - /* created mailbox list */ - UNSIGNED mb_id; /* Internal MCB ID */ - CHAR mb_name[NU_MAX_NAME]; /* Mailbox name */ - DATA_ELEMENT mb_message_present; /* Message present flag */ - DATA_ELEMENT mb_fifo_suspend; /* Suspension type flag */ -#if PAD_2 - DATA_ELEMENT mb_padding[PAD_2]; -#endif - UNSIGNED mb_tasks_waiting; /* Number of waiting tasks*/ - UNSIGNED /* Message area */ - mb_message_area[MB_MESSAGE_SIZE]; - struct MB_SUSPEND_STRUCT - *mb_suspension_list; /* Suspension list */ -} MB_MCB; - - -/* Define the mailbox suspension structure. This structure is allocated off of - the caller's stack. */ - -typedef struct MB_SUSPEND_STRUCT -{ - CS_NODE mb_suspend_link; /* Link to suspend blocks */ - MB_MCB *mb_mailbox; /* Pointer to the mailbox */ - TC_TCB *mb_suspended_task; /* Task suspended */ - UNSIGNED *mb_message_area; /* Pointer to message area*/ - STATUS mb_return_status; /* Return status */ -} MB_SUSPEND; - -#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/old/cs_defs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gpf/inc/nuc/old/cs_defs.h Sun Jul 15 21:02:08 2018 +0000 @@ -0,0 +1,87 @@ +/*************************************************************************/ +/* */ +/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ +/* */ +/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, */ +/* use, and sales rights pertaining to this subject matter are governed */ +/* by the license agreement. The recipient of this software implicitly */ +/* accepts the terms of the license. */ +/* */ +/*************************************************************************/ + +/*************************************************************************/ +/* */ +/* FILE NAME VERSION */ +/* */ +/* cs_defs.h PLUS 1.2 */ +/* */ +/* COMPONENT */ +/* */ +/* CS - Common Services */ +/* */ +/* DESCRIPTION */ +/* */ +/* This file contains data structure definitions used in the common */ +/* service linked list routines. */ +/* */ +/* AUTHOR */ +/* */ +/* William E. Lamie, Accelerated Technology, Inc. */ +/* */ +/* DATA STRUCTURES */ +/* */ +/* CS_NODE Link node structure */ +/* */ +/* FUNCTIONS */ +/* */ +/* None */ +/* */ +/* DEPENDENCIES */ +/* */ +/* nucleus.h Nucleus PLUS constants */ +/* */ +/* HISTORY */ +/* */ +/* NAME DATE REMARKS */ +/* */ +/* W. Lamie 03-01-1993 Created initial version 1.0 */ +/* D. Lamie 04-19-1993 Verified version 1.0 */ +/* W. Lamie 06-01-1993 Added padding conditional into */ +/* CS_NODE structure, making */ +/* version 1.0a */ +/* D. Lamie 06-01-1993 Verified version 1.0a */ +/* W. Lamie 03-01-1994 Moved include files outside of */ +/* the file #ifndef to allow the */ +/* use of actual data structures, */ +/* resulting in version 1.1 */ +/* R. Pfaff - */ +/* D. Lamie 03-18-1994 Verified version 1.1 */ +/* M.Q. Qian 04-17-1996 updated to version 1.2 */ +/* */ +/*************************************************************************/ + +#include "nucleus.h" /* Include Nucleus constants */ + + +/* Check to see if the file has been included already. */ +#ifndef CS_DEFS +#define CS_DEFS + + +/* Define a common node data structure that can be included inside of + other system data structures. */ + +typedef struct CS_NODE_STRUCT +{ + struct CS_NODE_STRUCT *cs_previous; + struct CS_NODE_STRUCT *cs_next; + DATA_ELEMENT cs_priority; + +#if PAD_1 + DATA_ELEMENT cs_padding[PAD_1]; +#endif + +} CS_NODE; + +#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/old/dm_defs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gpf/inc/nuc/old/dm_defs.h Sun Jul 15 21:02:08 2018 +0000 @@ -0,0 +1,141 @@ +/*************************************************************************/ +/* */ +/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ +/* */ +/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, */ +/* use, and sales rights pertaining to this subject matter are governed */ +/* by the license agreement. The recipient of this software implicitly */ +/* accepts the terms of the license. */ +/* */ +/*************************************************************************/ + +/*************************************************************************/ +/* */ +/* FILE NAME VERSION */ +/* */ +/* dm_defs.h PLUS 1.2a */ +/* */ +/* COMPONENT */ +/* */ +/* DM - Dynamic Memory Management */ +/* */ +/* DESCRIPTION */ +/* */ +/* This file contains data structure definitions and constants for */ +/* the Dynamic Memory component. */ +/* */ +/* AUTHOR */ +/* */ +/* William E. Lamie, Accelerated Technology, Inc. */ +/* */ +/* DATA STRUCTURES */ +/* */ +/* DM_PCB Dynamic Pool control block */ +/* DM_HEADER Header of each memory block */ +/* DM_SUSPEND Memory suspension block */ +/* */ +/* FUNCTIONS */ +/* */ +/* None */ +/* */ +/* DEPENDENCIES */ +/* */ +/* cs_defs.h Common service definitions */ +/* tc_defs.h Thread Control definitions */ +/* */ +/* HISTORY */ +/* */ +/* NAME DATE REMARKS */ +/* */ +/* W. Lamie 03-01-1993 Created initial version 1.0 */ +/* D. Lamie 04-19-1993 Verified version 1.0 */ +/* W. Lamie 03-01-1994 Moved include files outside of */ +/* the file #ifndef to allow the */ +/* use of actual data structures, */ +/* added padding logic, */ +/* resulting in version 1.1 */ +/* R. Pfaff - */ +/* D. Lamie 03-18-1994 Verified version 1.1 */ +/* M.Q. Qian 04-17-1996 updated to version 1.2 */ +/* M. Trippi 01-07-1996 Added missing PAD_1 field to */ +/* DM_HEADER_STRUCT to be */ +/* consistent with other PLUS */ +/* structures creating 1.2a. */ +/* */ +/*************************************************************************/ + +#include "cs_defs.h" /* Common service constants */ +#include "tc_defs.h" /* Thread control constants */ + + +/* Check to see if the file has been included already. */ + +#ifndef DM_DEFS +#define DM_DEFS + + +/* Define constants local to this component. */ + +#define DM_DYNAMIC_ID 0x44594e41UL +#define DM_OVERHEAD ((sizeof(DM_HEADER) + sizeof(UNSIGNED) \ + - 1)/sizeof(UNSIGNED)) * \ + sizeof(UNSIGNED) + + +/* Define the Dynamic Pool Control Block data type. */ + +typedef struct DM_PCB_STRUCT +{ + CS_NODE dm_created; /* Node for linking to */ + /* created dynamic pools */ + TC_PROTECT dm_protect; /* Protection structure */ + UNSIGNED dm_id; /* Internal PCB ID */ + CHAR dm_name[NU_MAX_NAME]; /* Dynamic Pool name */ + VOID *dm_start_address; /* Starting pool address */ + UNSIGNED dm_pool_size; /* Size of pool */ + UNSIGNED dm_min_allocation; /* Minimum allocate size */ + UNSIGNED dm_available; /* Total available bytes */ + struct DM_HEADER_STRUCT + *dm_memory_list; /* Memory list */ + struct DM_HEADER_STRUCT + *dm_search_ptr; /* Search pointer */ + DATA_ELEMENT dm_fifo_suspend; /* Suspension type flag */ +#if PAD_1 + DATA_ELEMENT dm_padding[PAD_1]; +#endif + UNSIGNED dm_tasks_waiting; /* Number of waiting tasks*/ + struct DM_SUSPEND_STRUCT + *dm_suspension_list; /* Suspension list */ +} DM_PCB; + + +/* Define the header structure that is in front of each memory block. */ + +typedef struct DM_HEADER_STRUCT +{ + struct DM_HEADER_STRUCT + *dm_next_memory, /* Next memory block */ + *dm_previous_memory; /* Previous memory block */ + DATA_ELEMENT dm_memory_free; /* Memory block free flag */ +#if PAD_1 + DATA_ELEMENT dm_padding[PAD_1]; +#endif + DM_PCB *dm_memory_pool; /* Dynamic pool pointer */ +} DM_HEADER; + + +/* Define the dynamic memory suspension structure. This structure is + allocated off of the caller's stack. */ + +typedef struct DM_SUSPEND_STRUCT +{ + CS_NODE dm_suspend_link; /* Link to suspend blocks */ + DM_PCB *dm_memory_pool; /* Pointer to pool */ + UNSIGNED dm_request_size; /* Size of memory request */ + TC_TCB *dm_suspended_task; /* Task suspended */ + VOID *dm_return_pointer; /* Return memory address */ + STATUS dm_return_status; /* Return status */ +} DM_SUSPEND; + +#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/old/ev_defs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gpf/inc/nuc/old/ev_defs.h Sun Jul 15 21:02:08 2018 +0000 @@ -0,0 +1,113 @@ +/*************************************************************************/ +/* */ +/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ +/* */ +/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, */ +/* use, and sales rights pertaining to this subject matter are governed */ +/* by the license agreement. The recipient of this software implicitly */ +/* accepts the terms of the license. */ +/* */ +/*************************************************************************/ + +/*************************************************************************/ +/* */ +/* FILE NAME VERSION */ +/* */ +/* ev_defs.h PLUS 1.2 */ +/* */ +/* COMPONENT */ +/* */ +/* EV - Event Group Management */ +/* */ +/* DESCRIPTION */ +/* */ +/* This file contains data structure definitions and constants for */ +/* the Event Flag Group component. */ +/* */ +/* AUTHOR */ +/* */ +/* William E. Lamie, Accelerated Technology, Inc. */ +/* */ +/* DATA STRUCTURES */ +/* */ +/* EV_GCB Event Group control block */ +/* EV_SUSPEND Event Group suspension block */ +/* */ +/* FUNCTIONS */ +/* */ +/* None */ +/* */ +/* DEPENDENCIES */ +/* */ +/* cs_defs.h Common service definitions */ +/* tc_defs.h Thread Control definitions */ +/* */ +/* HISTORY */ +/* */ +/* NAME DATE REMARKS */ +/* */ +/* W. Lamie 03-01-1993 Created initial version 1.0 */ +/* D. Lamie 04-19-1993 Verified version 1.0 */ +/* W. Lamie 03-01-1994 Moved include files outside of */ +/* the file #ifndef to allow the */ +/* use of actual data structures, */ +/* removed protect structure, */ +/* added padding logic, */ +/* resulting in version 1.1 */ +/* R. Pfaff - */ +/* D. Lamie 03-18-1994 Verified version 1.1 */ +/* M.Q. Qian 04-17-1996 updated to version 1.2 */ +/* */ +/*************************************************************************/ + +#include "cs_defs.h" /* Common service constants */ +#include "tc_defs.h" /* Thread control constants */ + + +/* Check to see if the file has been included already. */ + +#ifndef EV_DEFS +#define EV_DEFS + + +/* Define constants local to this component. */ + +#define EV_EVENT_ID 0x45564e54UL +#define EV_AND 0x2 +#define EV_CONSUME 0x1 + + +/* Define the Event Group Control Block data type. */ + +typedef struct EV_GCB_STRUCT +{ + CS_NODE ev_created; /* Node for linking to */ + /* created Events list */ + UNSIGNED ev_id; /* Internal EV ID */ + CHAR ev_name[NU_MAX_NAME]; /* Event group name */ + UNSIGNED ev_current_events; /* Current event flags */ + UNSIGNED ev_tasks_waiting; /* Number of waiting tasks*/ + struct EV_SUSPEND_STRUCT + *ev_suspension_list; /* Suspension list */ +} EV_GCB; + + +/* Define the Event Group suspension structure. This structure is allocated + off of the caller's stack. */ + +typedef struct EV_SUSPEND_STRUCT +{ + CS_NODE ev_suspend_link; /* Link to suspend blocks */ + EV_GCB *ev_event_group; /* Pointer to Event group */ + UNSIGNED ev_requested_events; /* Requested event flags */ + DATA_ELEMENT ev_operation; /* Event operation */ +#if PAD_1 + DATA_ELEMENT ev_padding[PAD_1]; +#endif + TC_TCB *ev_suspended_task; /* Task suspended */ + STATUS ev_return_status; /* Return status */ + UNSIGNED ev_actual_events; /* Event flags returned */ +} EV_SUSPEND; + +#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/old/mb_defs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gpf/inc/nuc/old/mb_defs.h Sun Jul 15 21:02:08 2018 +0000 @@ -0,0 +1,114 @@ +/*************************************************************************/ +/* */ +/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ +/* */ +/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, */ +/* use, and sales rights pertaining to this subject matter are governed */ +/* by the license agreement. The recipient of this software implicitly */ +/* accepts the terms of the license. */ +/* */ +/*************************************************************************/ + +/*************************************************************************/ +/* */ +/* FILE NAME VERSION */ +/* */ +/* mb_defs.h PLUS 1.2 */ +/* */ +/* COMPONENT */ +/* */ +/* MB - Mailbox Management */ +/* */ +/* DESCRIPTION */ +/* */ +/* This file contains data structure definitions and constants for */ +/* the message Mailbox component. */ +/* */ +/* AUTHOR */ +/* */ +/* William E. Lamie, Accelerated Technology, Inc. */ +/* */ +/* DATA STRUCTURES */ +/* */ +/* MB_MCB Mailbox control block */ +/* MB_SUSPEND Mailbox suspension block */ +/* */ +/* FUNCTIONS */ +/* */ +/* None */ +/* */ +/* DEPENDENCIES */ +/* */ +/* cs_defs.h Common service definitions */ +/* tc_defs.h Thread Control definitions */ +/* */ +/* HISTORY */ +/* */ +/* NAME DATE REMARKS */ +/* */ +/* W. Lamie 03-01-1993 Created initial version 1.0 */ +/* D. Lamie 04-19-1993 Verified version 1.0 */ +/* W. Lamie 03-01-1994 Moved include files outside of */ +/* the file #ifndef to allow the */ +/* use of actual data structures, */ +/* removed protection structure */ +/* inside of each mailbox, added */ +/* padding logic, resulting in */ +/* version 1.1 */ +/* R. Pfaff - */ +/* D. Lamie 03-18-1994 Verified version 1.1 */ +/* M.Q. Qian 04-17-1996 updated to version 1.2 */ +/* */ +/*************************************************************************/ + +#include "cs_defs.h" /* Common service constants */ +#include "tc_defs.h" /* Thread control constants */ + + +/* Check to see if the file has been included already. */ + +#ifndef MB_DEFS +#define MB_DEFS + + +/* Define constants local to this component. */ + +#define MB_MAILBOX_ID 0x4d424f58UL +#define MB_MESSAGE_SIZE 4 + + +/* Define the Mailbox Control Block data type. */ + +typedef struct MB_MCB_STRUCT +{ + CS_NODE mb_created; /* Node for linking to */ + /* created mailbox list */ + UNSIGNED mb_id; /* Internal MCB ID */ + CHAR mb_name[NU_MAX_NAME]; /* Mailbox name */ + DATA_ELEMENT mb_message_present; /* Message present flag */ + DATA_ELEMENT mb_fifo_suspend; /* Suspension type flag */ +#if PAD_2 + DATA_ELEMENT mb_padding[PAD_2]; +#endif + UNSIGNED mb_tasks_waiting; /* Number of waiting tasks*/ + UNSIGNED /* Message area */ + mb_message_area[MB_MESSAGE_SIZE]; + struct MB_SUSPEND_STRUCT + *mb_suspension_list; /* Suspension list */ +} MB_MCB; + + +/* Define the mailbox suspension structure. This structure is allocated off of + the caller's stack. */ + +typedef struct MB_SUSPEND_STRUCT +{ + CS_NODE mb_suspend_link; /* Link to suspend blocks */ + MB_MCB *mb_mailbox; /* Pointer to the mailbox */ + TC_TCB *mb_suspended_task; /* Task suspended */ + UNSIGNED *mb_message_area; /* Pointer to message area*/ + STATUS mb_return_status; /* Return status */ +} MB_SUSPEND; + +#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/old/nucleus.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gpf/inc/nuc/old/nucleus.h Sun Jul 15 21:02:08 2018 +0000 @@ -0,0 +1,1120 @@ +/*************************************************************************/ +/* */ +/* Copyright (c) 1993-1994 Accelerated Technology, Inc. */ +/* */ +/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, */ +/* use, and sales rights pertaining to this subject matter are governed */ +/* by the license agreement. The recipient of this software implicitly */ +/* accepts the terms of the license. */ +/* */ +/*************************************************************************/ + +/*************************************************************************/ +/* */ +/* FILE NAME VERSION */ +/* */ +/* nucleus.h PLUS/THUMB/T 1.0 */ +/* */ +/* COMPONENT */ +/* */ +/* System Constants */ +/* */ +/* DESCRIPTION */ +/* */ +/* This file contains system constants common to both the */ +/* application and the actual Nucleus PLUS components. This file */ +/* also contains data structure definitions that hide internal */ +/* information from the application. */ +/* */ +/* AUTHOR */ +/* */ +/* Barry Sellew, Accelerated Technology, Inc. */ +/* */ +/* DATA STRUCTURES */ +/* */ +/* NU_DRIVER I/O Driver control block */ +/* NU_EVENT_GROUP Event group control block */ +/* NU_HISR HISR control block */ +/* NU_MAILBOX Mailbox control block */ +/* NU_MEMORY_POOL Memory Pool control block */ +/* NU_PARTITION_POOL Partition Pool control block */ +/* NU_PIPE Pipe control block */ +/* NU_QUEUE Queue control block */ +/* NU_SEMAPHORE Semaphore control block */ +/* NU_TASK Task control block */ +/* NU_TIMER Timer control block */ +/* NU_PROTECT Protection structure */ +/* */ +/* FUNCTIONS */ +/* */ +/* None */ +/* */ +/* DEPENDENCIES */ +/* */ +/* None */ +/* */ +/* HISTORY */ +/* */ +/* NAME DATE REMARKS */ +/* */ +/* W. Lamie 04-19-1994 Created R4xxx version 1.0 */ +/* */ +/*************************************************************************/ + +/* Check to see if this file has been included already. */ + +#ifndef NUCLEUS + +#ifdef __cplusplus +extern "C" { /* C declarations in C++ */ +#endif + +#define NUCLEUS + +/* Define standard data types. These definitions allow Nucleus PLUS to + perform in the same manner on different target platforms. */ + +typedef unsigned long UNSIGNED; +typedef long SIGNED; +typedef unsigned char DATA_ELEMENT; +typedef DATA_ELEMENT OPTION; +typedef int STATUS; +typedef unsigned char UNSIGNED_CHAR; +typedef char CHAR; +typedef int INT; +typedef void VOID; +typedef unsigned long * UNSIGNED_PTR; +typedef unsigned char * BYTE_PTR; + + +/* Define register defines. R1, R2, R3, and R4 are used in the Nucleus PLUS + source code in front of variables that are referenced often. In some + ports, defining them as "register" will improve performance. */ + +#define R1 register +#define R2 register +#define R3 register +#define R4 register + + +/* Define the number of accesses required to read or write a pointer data + type. This value is used to make optimizations in some ports of Nucleus + PLUS. */ + +#define NU_POINTER_ACCESS 1 + + +/* Define the padding required for usage of the DATA_ELEMENT type within + Nucleus PLUS structures. These values insure proper alignment for the + next structure member. */ + +#define PAD_1 3 +#define PAD_2 2 +#define PAD_3 1 + + + +/* Define constants that are target dependent and/or are used for internal + purposes. */ + +#define NU_MIN_STACK_SIZE 240 +#define NU_MAX_NAME 8 +#define NU_MAX_VECTORS 8 +#define NU_MAX_LISRS 8 + + +/* Define constants for the number of UNSIGNED words in each of the basic + system data structures. */ + +#define NU_TASK_SIZE 42 +#define NU_HISR_SIZE 22 +#define NU_MAILBOX_SIZE 13 +#define NU_QUEUE_SIZE 18 +#define NU_PIPE_SIZE 18 +#define NU_SEMAPHORE_SIZE 10 +#define NU_EVENT_GROUP_SIZE 9 +#define NU_PARTITION_POOL_SIZE 15 +#define NU_MEMORY_POOL_SIZE 17 +#define NU_TIMER_SIZE 17 +#define NU_PROTECT_SIZE 2 +#define NU_DRIVER_SIZE 3 + + +/* Define what an interrupt vector looks like on the target processor. */ + +typedef struct NU_VECTOR_STRUCT +{ + VOID *pointer; +} NU_VECTOR; + + +/* Define constants for use in service parameters. */ + +#define NU_AND 2 +#define NU_AND_CONSUME 3 +#define NU_DISABLE_TIMER 4 +#define NU_ENABLE_TIMER 5 +#define NU_FALSE 0 +#define NU_FIFO 6 +#define NU_FIXED_SIZE 7 +#define NU_NO_PREEMPT 8 +#define NU_NO_START 9 +#define NU_NO_SUSPEND 0 +#define NU_NULL 0 +#define NU_OR 0 +#define NU_OR_CONSUME 1 +#define NU_PREEMPT 10 +#define NU_PRIORITY 11 +#define NU_START 12 +#define NU_SUSPEND 0xFFFFFFFFUL +#define NU_TRUE 1 +#define NU_VARIABLE_SIZE 13 + + +/* Define interrupt lockout and enable constants. */ + +#define NU_DISABLE_INTERRUPTS 0xC0 +#define NU_ENABLE_INTERRUPTS 0x00 + + +/* Define task suspension constants. */ + +#define NU_DRIVER_SUSPEND 10 +#define NU_EVENT_SUSPEND 7 +#define NU_FINISHED 11 +#define NU_MAILBOX_SUSPEND 3 +#define NU_MEMORY_SUSPEND 9 +#define NU_PARTITION_SUSPEND 8 +#define NU_PIPE_SUSPEND 5 +#define NU_PURE_SUSPEND 1 +#define NU_QUEUE_SUSPEND 4 +#define NU_READY 0 +#define NU_SEMAPHORE_SUSPEND 6 +#define NU_SLEEP_SUSPEND 2 +#define NU_TERMINATED 12 + +/* Define service completion status constants. */ + +#define NU_SUCCESS 0 +#define NU_END_OF_LOG -1 +#define NU_GROUP_DELETED -2 +#define NU_INVALID_DELETE -3 +#define NU_INVALID_DRIVER -4 +#define NU_INVALID_ENABLE -5 +#define NU_INVALID_ENTRY -6 +#define NU_INVALID_FUNCTION -7 +#define NU_INVALID_GROUP -8 +#define NU_INVALID_HISR -9 +#define NU_INVALID_MAILBOX -10 +#define NU_INVALID_MEMORY -11 +#define NU_INVALID_MESSAGE -12 +#define NU_INVALID_OPERATION -13 +#define NU_INVALID_PIPE -14 +#define NU_INVALID_POINTER -15 +#define NU_INVALID_POOL -16 +#define NU_INVALID_PREEMPT -17 +#define NU_INVALID_PRIORITY -18 +#define NU_INVALID_QUEUE -19 +#define NU_INVALID_RESUME -20 +#define NU_INVALID_SEMAPHORE -21 +#define NU_INVALID_SIZE -22 +#define NU_INVALID_START -23 +#define NU_INVALID_SUSPEND -24 +#define NU_INVALID_TASK -25 +#define NU_INVALID_TIMER -26 +#define NU_INVALID_VECTOR -27 +#define NU_MAILBOX_DELETED -28 +#define NU_MAILBOX_EMPTY -29 +#define NU_MAILBOX_FULL -30 +#define NU_MAILBOX_RESET -31 +#define NU_NO_MEMORY -32 +#define NU_NO_MORE_LISRS -33 +#define NU_NO_PARTITION -34 +#define NU_NOT_DISABLED -35 +#define NU_NOT_PRESENT -36 +#define NU_NOT_REGISTERED -37 +#define NU_NOT_TERMINATED -38 +#define NU_PIPE_DELETED -39 +#define NU_PIPE_EMPTY -40 +#define NU_PIPE_FULL -41 +#define NU_PIPE_RESET -42 +#define NU_POOL_DELETED -43 +#define NU_QUEUE_DELETED -44 +#define NU_QUEUE_EMPTY -45 +#define NU_QUEUE_FULL -46 +#define NU_QUEUE_RESET -47 +#define NU_SEMAPHORE_DELETED -48 +#define NU_SEMAPHORE_RESET -49 +#define NU_TIMEOUT -50 +#define NU_UNAVAILABLE -51 + + +/* Define system errors. */ + +#define NU_ERROR_CREATING_TIMER_HISR 1 +#define NU_ERROR_CREATING_TIMER_TASK 2 +#define NU_STACK_OVERFLOW 3 +#define NU_UNHANDLED_INTERRUPT 4 + + +/* Define I/O driver constants. */ + +#define NU_IO_ERROR -1 +#define NU_INITIALIZE 1 +#define NU_ASSIGN 2 +#define NU_RELEASE 3 +#define NU_INPUT 4 +#define NU_OUTPUT 5 +#define NU_STATUS 6 +#define NU_TERMINATE 7 + + +/* Define history entry IDs. */ + +#define NU_USER_ID 1 +#define NU_CREATE_TASK_ID 2 +#define NU_DELETE_TASK_ID 3 +#define NU_RESET_TASK_ID 4 +#define NU_TERMINATE_TASK_ID 5 +#define NU_RESUME_TASK_ID 6 +#define NU_SUSPEND_TASK_ID 7 +#define NU_RELINQUISH_ID 8 +#define NU_SLEEP_ID 9 +#define NU_CHANGE_PRIORITY_ID 10 +#define NU_CHANGE_PREEMPTION_ID 11 +#define NU_CREATE_MAILBOX_ID 12 +#define NU_DELETE_MAILBOX_ID 13 +#define NU_RESET_MAILBOX_ID 14 +#define NU_SEND_TO_MAILBOX_ID 15 +#define NU_BROADCAST_TO_MAILBOX_ID 16 +#define NU_RECEIVE_FROM_MAILBOX_ID 17 +#define NU_CREATE_QUEUE_ID 18 +#define NU_DELETE_QUEUE_ID 19 +#define NU_RESET_QUEUE_ID 20 +#define NU_SEND_TO_FRONT_OF_QUEUE_ID 21 +#define NU_SEND_TO_QUEUE_ID 22 +#define NU_BROADCAST_TO_QUEUE_ID 23 +#define NU_RECEIVE_FROM_QUEUE_ID 24 +#define NU_CREATE_PIPE_ID 25 +#define NU_DELETE_PIPE_ID 26 +#define NU_RESET_PIPE_ID 27 +#define NU_SEND_TO_FRONT_OF_PIPE_ID 28 +#define NU_SEND_TO_PIPE_ID 29 +#define NU_BROADCAST_TO_PIPE_ID 30 +#define NU_RECEIVE_FROM_PIPE_ID 31 +#define NU_CREATE_SEMAPHORE_ID 32 +#define NU_DELETE_SEMAPHORE_ID 33 +#define NU_RESET_SEMAPHORE_ID 34 +#define NU_OBTAIN_SEMAPHORE_ID 35 +#define NU_RELEASE_SEMAPHORE_ID 36 +#define NU_CREATE_EVENT_GROUP_ID 37 +#define NU_DELETE_EVENT_GROUP_ID 38 +#define NU_SET_EVENTS_ID 39 +#define NU_RETRIEVE_EVENTS_ID 40 +#define NU_CREATE_PARTITION_POOL_ID 41 +#define NU_DELETE_PARTITION_POOL_ID 42 +#define NU_ALLOCATE_PARTITION_ID 43 +#define NU_DEALLOCATE_PARTITION_ID 44 +#define NU_CREATE_MEMORY_POOL_ID 45 +#define NU_DELETE_MEMORY_POOL_ID 46 +#define NU_ALLOCATE_MEMORY_ID 47 +#define NU_DEALLOCATE_MEMORY_ID 48 +#define NU_CONTROL_SIGNALS_ID 49 +#define NU_RECEIVE_SIGNALS_ID 50 +#define NU_REGISTER_SIGNAL_HANDLER_ID 51 +#define NU_SEND_SIGNALS_ID 52 +#define NU_REGISTER_LISR_ID 53 +#define NU_CREATE_HISR_ID 54 +#define NU_DELETE_HISR_ID 55 +#define NU_CREATE_TIMER_ID 56 +#define NU_DELETE_TIMER_ID 57 +#define NU_CONTROL_TIMER_ID 58 +#define NU_RESET_TIMER_ID 59 +#define NU_CREATE_DRIVER_ID 60 +#define NU_DELETE_DRIVER_ID 61 +#define NU_REQUEST_DRIVER_ID 62 +#define NU_RESUME_DRIVER_ID 63 +#define NU_SUSPEND_DRIVER_ID 64 +#define NU_CHANGE_TIME_SLICE_ID 65 + + +/* Define the basic data structure templates. If the NU_DEBUG conditional + compilation is specified, the actual structure definition is used. */ + +#ifdef NU_DEBUG +#include "cs_defs.h" +#include "tm_defs.h" +#include "tc_defs.h" +#include "mb_defs.h" +#include "qu_defs.h" +#include "pi_defs.h" +#include "sm_defs.h" +#include "ev_defs.h" +#include "pm_defs.h" +#include "dm_defs.h" +#endif + + +#ifndef NU_DEBUG + +/* Define task control data structure with all internal information + hidden. */ +typedef struct NU_TASK_STRUCT +{ + UNSIGNED words[NU_TASK_SIZE]; +} NU_TASK; +#else + +/* Define task control data structure with the actual internal data + structure. */ +typedef TC_TCB NU_TASK; +#endif + + +#ifndef NU_DEBUG + +/* Define HISR control data structure with all internal information + hidden. */ +typedef struct NU_HISR_STRUCT +{ + UNSIGNED words[NU_HISR_SIZE]; +} NU_HISR; +#else + +/* Define HISR control data structure with the actual internal data + structure. */ +typedef TC_HCB NU_HISR; +#endif + + +#ifndef NU_DEBUG + +/* Define mailbox control data structure with all internal information + hidden. */ +typedef struct NU_MAILBOX_STRUCT +{ + UNSIGNED words[NU_MAILBOX_SIZE]; +} NU_MAILBOX; +#else + +/* Define mailbox control data structure with the actual internal data + structure. */ +typedef MB_MCB NU_MAILBOX; +#endif + + +#ifndef NU_DEBUG + +/* Define queue control data structure with all internal information + hidden. */ +typedef struct NU_QUEUE_STRUCT +{ + UNSIGNED words[NU_QUEUE_SIZE]; +} NU_QUEUE; +#else + +/* Define queue control data structure with the actual internal data + structure. */ +typedef QU_QCB NU_QUEUE; +#endif + + +#ifndef NU_DEBUG + +/* Define pipe control data structure with all internal information + hidden. */ +typedef struct NU_PIPE_STRUCT +{ + UNSIGNED words[NU_PIPE_SIZE]; +} NU_PIPE; +#else + +/* Define pipe control data structure with the actual internal data + structure. */ +typedef PI_PCB NU_PIPE; +#endif + + +#ifndef NU_DEBUG + +/* Define semaphore control data structure with all internal information + hidden. */ +typedef struct NU_SEMAPHORE_STRUCT +{ + UNSIGNED words[NU_SEMAPHORE_SIZE]; +} NU_SEMAPHORE; +#else + +/* Define semaphore control data structure with the actual internal data + structure. */ +typedef SM_SCB NU_SEMAPHORE; +#endif + + +#ifndef NU_DEBUG + +/* Define event group control data structure with all internal information + hidden. */ +typedef struct NU_EVENT_GROUP_STRUCT +{ + UNSIGNED words[NU_EVENT_GROUP_SIZE]; +} NU_EVENT_GROUP; +#else + +/* Define event group control data structure with the actual internal data + structure. */ +typedef EV_GCB NU_EVENT_GROUP; +#endif + + +#ifndef NU_DEBUG + +/* Define partition pool control data structure with all internal + information hidden. */ +typedef struct NU_PARTITION_POOL_STRUCT +{ + UNSIGNED words[NU_PARTITION_POOL_SIZE]; +} NU_PARTITION_POOL; +#else + +/* Define partition pool control data structure with the actual internal + data structure. */ +typedef PM_PCB NU_PARTITION_POOL; +#endif + + +#ifndef NU_DEBUG + +/* Define memory pool control data structure with all internal information + hidden. */ +typedef struct NU_MEMORY_POOL_STRUCT +{ + UNSIGNED words[NU_MEMORY_POOL_SIZE]; +} NU_MEMORY_POOL; +#else + +/* Define memory pool control data structure with the actual internal data + structure. */ +typedef DM_PCB NU_MEMORY_POOL; +#endif + + +#ifndef NU_DEBUG + +/* Define timer control data structure with all internal information + hidden. */ +typedef struct NU_TIMER_STRUCT +{ + UNSIGNED words[NU_TIMER_SIZE]; +} NU_TIMER; +#else + +/* Define timer control data structure with the actual internal data + structure. */ +typedef TM_APP_TCB NU_TIMER; +#endif + + +#ifndef NU_DEBUG + +/* Define protect control data structure with all internal information + hidden. */ +typedef struct NU_PROTECT_STRUCT +{ + UNSIGNED words[NU_PROTECT_SIZE]; +} NU_PROTECT; +#else + +/* Define protect control data structure with the actual internal data + structure. */ +typedef TC_PROTECT NU_PROTECT; +#endif + + + +/* Define I/O driver request structures. */ + +struct NU_INITIALIZE_STRUCT +{ + VOID *nu_io_address; /* Base IO address */ + UNSIGNED nu_logical_units; /* Number of logical units */ + VOID *nu_memory; /* Generic memory pointer */ + INT nu_vector; /* Interrupt vector number */ +}; + +struct NU_ASSIGN_STRUCT +{ + UNSIGNED nu_logical_unit; /* Logical unit number */ + INT nu_assign_info; /* Additional assign info */ +}; + +struct NU_RELEASE_STRUCT +{ + UNSIGNED nu_logical_unit; /* Logical unit number */ + INT nu_release_info; /* Additional release info */ +}; + +struct NU_INPUT_STRUCT +{ + UNSIGNED nu_logical_unit; /* Logical unit number */ + UNSIGNED nu_offset; /* Offset of input */ + UNSIGNED nu_request_size; /* Requested input size */ + UNSIGNED nu_actual_size; /* Actual input size */ + VOID *nu_buffer_ptr; /* Input buffer pointer */ +}; + +struct NU_OUTPUT_STRUCT +{ + UNSIGNED nu_logical_unit; /* Logical unit number */ + UNSIGNED nu_offset; /* Offset of output */ + UNSIGNED nu_request_size; /* Requested output size */ + UNSIGNED nu_actual_size; /* Actual output size */ + VOID *nu_buffer_ptr; /* Output buffer pointer */ +}; + +struct NU_STATUS_STRUCT +{ + UNSIGNED nu_logical_unit; /* Logical unit number */ + VOID *nu_extra_status; /* Additional status ptr */ +}; + +struct NU_TERMINATE_STRUCT +{ + UNSIGNED nu_logical_unit; /* Logical unit number */ +}; + + +typedef struct NU_DRIVER_REQUEST_STRUCT +{ + INT nu_function; /* I/O request function */ + UNSIGNED nu_timeout; /* Timeout on request */ + STATUS nu_status; /* Status of request */ + UNSIGNED nu_supplemental; /* Supplemental information */ + VOID *nu_supplemental_ptr; /* Supplemental info pointer*/ + + /* Define a union of all the different types of request structures. */ + union NU_REQUEST_INFO_UNION + { + struct NU_INITIALIZE_STRUCT nu_initialize; + struct NU_ASSIGN_STRUCT nu_assign; + struct NU_RELEASE_STRUCT nu_release; + struct NU_INPUT_STRUCT nu_input; + struct NU_OUTPUT_STRUCT nu_output; + struct NU_STATUS_STRUCT nu_status; + struct NU_TERMINATE_STRUCT nu_terminate; + } nu_request_info; + +} NU_DRIVER_REQUEST; + +typedef struct NU_DRIVER_STRUCT +{ + UNSIGNED words[NU_DRIVER_SIZE]; + CHAR nu_driver_name[NU_MAX_NAME]; + VOID *nu_info_ptr; + UNSIGNED nu_driver_id; + VOID (*nu_driver_entry)(struct NU_DRIVER_STRUCT *, + NU_DRIVER_REQUEST *); +} NU_DRIVER; + + + +/* Define Nucleus PLUS system interfaces. */ + +VOID Application_Initialize(VOID *first_available_memory); + + +/* The following area is only applicable to application files and is skipped + during compilation of Nucleus PLUS source files. */ +#ifndef NU_SOURCE_FILE + +/* Re-map task control functions depending on whether or not error checking + is specified. */ +#ifdef NU_NO_ERROR_CHECKING +#define NU_Create_Task TCC_Create_Task +#define NU_Delete_Task TCC_Delete_Task +#define NU_Reset_Task TCC_Reset_Task +#define NU_Terminate_Task TCC_Terminate_Task +#define NU_Resume_Task TCC_Resume_Service +#define NU_Suspend_Task TCC_Suspend_Service +#define NU_Relinquish TCC_Relinquish +#define NU_Sleep TCC_Task_Sleep +#define NU_Change_Priority TCS_Change_Priority +#define NU_Change_Preemption TCS_Change_Preemption +#define NU_Change_Time_Slice TCS_Change_Time_Slice +#define NU_Check_Stack TCT_Check_Stack +#define NU_Current_Task_Pointer TCC_Current_Task_Pointer +#define NU_Established_Tasks TCF_Established_Tasks +#define NU_Task_Information TCF_Task_Information +#define NU_Task_Pointers TCF_Task_Pointers +#define NU_Create_Mailbox MBC_Create_Mailbox +#define NU_Delete_Mailbox MBC_Delete_Mailbox +#define NU_Reset_Mailbox MBS_Reset_Mailbox +#define NU_Send_To_Mailbox MBC_Send_To_Mailbox +#define NU_Broadcast_To_Mailbox MBS_Broadcast_To_Mailbox +#define NU_Receive_From_Mailbox MBC_Receive_From_Mailbox +#define NU_Established_Mailboxes MBF_Established_Mailboxes +#define NU_Mailbox_Information MBF_Mailbox_Information +#define NU_Mailbox_Pointers MBF_Mailbox_Pointers +#define NU_Create_Queue QUC_Create_Queue +#define NU_Delete_Queue QUC_Delete_Queue +#define NU_Reset_Queue QUS_Reset_Queue +#define NU_Send_To_Front_Of_Queue QUS_Send_To_Front_Of_Queue +#define NU_Send_To_Queue QUC_Send_To_Queue +#define NU_Broadcast_To_Queue QUS_Broadcast_To_Queue +#define NU_Receive_From_Queue QUC_Receive_From_Queue +#define NU_Established_Queues QUF_Established_Queues +#define NU_Queue_Information QUF_Queue_Information +#define NU_Queue_Pointers QUF_Queue_Pointers +#define NU_Create_Pipe PIC_Create_Pipe +#define NU_Delete_Pipe PIC_Delete_Pipe +#define NU_Reset_Pipe PIS_Reset_Pipe +#define NU_Send_To_Front_Of_Pipe PIS_Send_To_Front_Of_Pipe +#define NU_Send_To_Pipe PIC_Send_To_Pipe +#define NU_Broadcast_To_Pipe PIS_Broadcast_To_Pipe +#define NU_Receive_From_Pipe PIC_Receive_From_Pipe +#define NU_Established_Pipes PIF_Established_Pipes +#define NU_Pipe_Information PIF_Pipe_Information +#define NU_Pipe_Pointers PIF_Pipe_Pointers +#define NU_Create_Semaphore SMC_Create_Semaphore +#define NU_Delete_Semaphore SMC_Delete_Semaphore +#define NU_Reset_Semaphore SMS_Reset_Semaphore +#define NU_Obtain_Semaphore SMC_Obtain_Semaphore +#define NU_Release_Semaphore SMC_Release_Semaphore +#define NU_Established_Semaphores SMF_Established_Semaphores +#define NU_Semaphore_Information SMF_Semaphore_Information +#define NU_Semaphore_Pointers SMF_Semaphore_Pointers +#define NU_Create_Event_Group EVC_Create_Event_Group +#define NU_Delete_Event_Group EVC_Delete_Event_Group +#define NU_Set_Events EVC_Set_Events +#define NU_Retrieve_Events EVC_Retrieve_Events +#define NU_Established_Event_Groups EVF_Established_Event_Groups +#define NU_Event_Group_Information EVF_Event_Group_Information +#define NU_Event_Group_Pointers EVF_Event_Group_Pointers +#define NU_Create_Partition_Pool PMC_Create_Partition_Pool +#define NU_Delete_Partition_Pool PMC_Delete_Partition_Pool +#define NU_Allocate_Partition PMC_Allocate_Partition +#define NU_Deallocate_Partition PMC_Deallocate_Partition +#define NU_Established_Partition_Pools PMF_Established_Partition_Pools +#define NU_Partition_Pool_Information PMF_Partition_Pool_Information +#define NU_Partition_Pool_Pointers PMF_Partition_Pool_Pointers +#define NU_Create_Memory_Pool DMC_Create_Memory_Pool +#define NU_Delete_Memory_Pool DMC_Delete_Memory_Pool +#define NU_Allocate_Memory DMC_Allocate_Memory +#define NU_Deallocate_Memory DMC_Deallocate_Memory +#define NU_Established_Memory_Pools DMF_Established_Memory_Pools +#define NU_Memory_Pool_Information DMF_Memory_Pool_Information +#define NU_Memory_Pool_Pointers DMF_Memory_Pool_Pointers +#define NU_Control_Signals TCS_Control_Signals +#define NU_Receive_Signals TCS_Receive_Signals +#define NU_Register_Signal_Handler TCS_Register_Signal_Handler +#define NU_Send_Signals TCS_Send_Signals +#define NU_Setup_Vector INT_Setup_Vector +#define NU_Register_LISR TCC_Register_LISR +#define NU_Activate_HISR TCT_Activate_HISR +#define NU_Create_HISR TCC_Create_HISR +#define NU_Delete_HISR TCC_Delete_HISR +#define NU_Current_HISR_Pointer TCC_Current_HISR_Pointer +#define NU_Established_HISRs TCF_Established_HISRs +#define NU_HISR_Pointers TCF_HISR_Pointers +#define NU_HISR_Information TCF_HISR_Information +#define NU_Protect TCT_Protect +#define NU_Unprotect TCT_Unprotect +#define NU_Control_Interrupts TCT_Control_Interrupts +#define NU_Local_Control_Interrupts TCT_Local_Control_Interrupts +#define NU_Restore_Interrupts TCT_Restore_Interrupts +#define NU_Set_Clock TMT_Set_Clock +#define NU_Retrieve_Clock TMT_Retrieve_Clock +#define NU_Create_Timer TMS_Create_Timer +#define NU_Delete_Timer TMS_Delete_Timer +#define NU_Control_Timer TMS_Control_Timer +#define NU_Reset_Timer TMS_Reset_Timer +#define NU_Established_Timers TMF_Established_Timers +#define NU_Timer_Pointers TMF_Timer_Pointers +#define NU_Timer_Information TMF_Timer_Information +#define NU_Release_Information RLC_Release_Information +#define NU_License_Information LIC_License_Information +#define NU_Disable_History_Saving HIC_Disable_History_Saving +#define NU_Enable_History_Saving HIC_Enable_History_Saving +#define NU_Make_History_Entry HIC_Make_History_Entry_Service +#define NU_Retrieve_History_Entry HIC_Retrieve_History_Entry +#define NU_Create_Driver IOC_Create_Driver +#define NU_Delete_Driver IOC_Delete_Driver +#define NU_Request_Driver IOC_Request_Driver +#define NU_Resume_Driver IOC_Resume_Driver +#define NU_Suspend_Driver IOC_Suspend_Driver +#define NU_Established_Drivers IOF_Established_Drivers +#define NU_Driver_Pointers IOF_Driver_Pointers +#else +#define NU_Create_Task TCCE_Create_Task +#define NU_Delete_Task TCCE_Delete_Task +#define NU_Reset_Task TCCE_Reset_Task +#define NU_Terminate_Task TCCE_Terminate_Task +#define NU_Resume_Task TCCE_Resume_Service +#define NU_Suspend_Task TCCE_Suspend_Service +#define NU_Relinquish TCCE_Relinquish +#define NU_Sleep TCCE_Task_Sleep +#define NU_Change_Priority TCSE_Change_Priority +#define NU_Change_Preemption TCSE_Change_Preemption +#define NU_Change_Time_Slice TCSE_Change_Time_Slice +#define NU_Check_Stack TCT_Check_Stack +#define NU_Current_Task_Pointer TCC_Current_Task_Pointer +#define NU_Established_Tasks TCF_Established_Tasks +#define NU_Task_Information TCF_Task_Information +#define NU_Task_Pointers TCF_Task_Pointers +#define NU_Create_Mailbox MBCE_Create_Mailbox +#define NU_Delete_Mailbox MBCE_Delete_Mailbox +#define NU_Reset_Mailbox MBSE_Reset_Mailbox +#define NU_Send_To_Mailbox MBCE_Send_To_Mailbox +#define NU_Broadcast_To_Mailbox MBSE_Broadcast_To_Mailbox +#define NU_Receive_From_Mailbox MBCE_Receive_From_Mailbox +#define NU_Established_Mailboxes MBF_Established_Mailboxes +#define NU_Mailbox_Information MBF_Mailbox_Information +#define NU_Mailbox_Pointers MBF_Mailbox_Pointers +#define NU_Create_Queue QUCE_Create_Queue +#define NU_Delete_Queue QUCE_Delete_Queue +#define NU_Reset_Queue QUSE_Reset_Queue +#define NU_Send_To_Queue QUCE_Send_To_Queue +#define NU_Send_To_Front_Of_Queue QUSE_Send_To_Front_Of_Queue +#define NU_Broadcast_To_Queue QUSE_Broadcast_To_Queue +#define NU_Receive_From_Queue QUCE_Receive_From_Queue +#define NU_Established_Queues QUF_Established_Queues +#define NU_Queue_Information QUF_Queue_Information +#define NU_Queue_Pointers QUF_Queue_Pointers +#define NU_Create_Pipe PICE_Create_Pipe +#define NU_Delete_Pipe PICE_Delete_Pipe +#define NU_Reset_Pipe PISE_Reset_Pipe +#define NU_Send_To_Front_Of_Pipe PISE_Send_To_Front_Of_Pipe +#define NU_Send_To_Pipe PICE_Send_To_Pipe +#define NU_Broadcast_To_Pipe PISE_Broadcast_To_Pipe +#define NU_Receive_From_Pipe PICE_Receive_From_Pipe +#define NU_Established_Pipes PIF_Established_Pipes +#define NU_Pipe_Information PIF_Pipe_Information +#define NU_Pipe_Pointers PIF_Pipe_Pointers +#define NU_Create_Semaphore SMCE_Create_Semaphore +#define NU_Delete_Semaphore SMCE_Delete_Semaphore +#define NU_Reset_Semaphore SMSE_Reset_Semaphore +#define NU_Obtain_Semaphore SMCE_Obtain_Semaphore +#define NU_Release_Semaphore SMCE_Release_Semaphore +#define NU_Established_Semaphores SMF_Established_Semaphores +#define NU_Semaphore_Information SMF_Semaphore_Information +#define NU_Semaphore_Pointers SMF_Semaphore_Pointers +#define NU_Create_Event_Group EVCE_Create_Event_Group +#define NU_Delete_Event_Group EVCE_Delete_Event_Group +#define NU_Set_Events EVCE_Set_Events +#define NU_Retrieve_Events EVCE_Retrieve_Events +#define NU_Established_Event_Groups EVF_Established_Event_Groups +#define NU_Event_Group_Information EVF_Event_Group_Information +#define NU_Event_Group_Pointers EVF_Event_Group_Pointers +#define NU_Create_Partition_Pool PMCE_Create_Partition_Pool +#define NU_Delete_Partition_Pool PMCE_Delete_Partition_Pool +#define NU_Allocate_Partition PMCE_Allocate_Partition +#define NU_Deallocate_Partition PMCE_Deallocate_Partition +#define NU_Established_Partition_Pools PMF_Established_Partition_Pools +#define NU_Partition_Pool_Information PMF_Partition_Pool_Information +#define NU_Partition_Pool_Pointers PMF_Partition_Pool_Pointers +#define NU_Create_Memory_Pool DMCE_Create_Memory_Pool +#define NU_Delete_Memory_Pool DMCE_Delete_Memory_Pool +#define NU_Allocate_Memory DMCE_Allocate_Memory +#define NU_Deallocate_Memory DMCE_Deallocate_Memory +#define NU_Established_Memory_Pools DMF_Established_Memory_Pools +#define NU_Memory_Pool_Information DMF_Memory_Pool_Information +#define NU_Memory_Pool_Pointers DMF_Memory_Pool_Pointers +#define NU_Control_Signals TCSE_Control_Signals +#define NU_Receive_Signals TCSE_Receive_Signals +#define NU_Register_Signal_Handler TCSE_Register_Signal_Handler +#define NU_Send_Signals TCSE_Send_Signals +#define NU_Setup_Vector INT_Setup_Vector +#define NU_Register_LISR TCC_Register_LISR +#define NU_Activate_HISR TCCE_Activate_HISR +#define NU_Create_HISR TCCE_Create_HISR +#define NU_Delete_HISR TCCE_Delete_HISR +#define NU_Current_HISR_Pointer TCF_Current_HISR_Pointer +#define NU_Established_HISRs TCF_Established_HISRs +#define NU_HISR_Pointers TCF_HISR_Pointers +#define NU_HISR_Information TCF_HISR_Information +#define NU_Protect TCT_Protect +#define NU_Unprotect TCT_Unprotect +#define NU_Control_Interrupts TCT_Control_Interrupts +#define NU_Local_Control_Interrupts TCT_Local_Control_Interrupts +#define NU_Restore_Interrupts TCT_Restore_Interrupts +#define NU_Set_Clock TMT_Set_Clock +#define NU_Retrieve_Clock TMT_Retrieve_Clock +#define NU_Create_Timer TMSE_Create_Timer +#define NU_Delete_Timer TMSE_Delete_Timer +#define NU_Control_Timer TMSE_Control_Timer +#define NU_Reset_Timer TMSE_Reset_Timer +#define NU_Established_Timers TMF_Established_Timers +#define NU_Timer_Pointers TMF_Timer_Pointers +#define NU_Timer_Information TMF_Timer_Information +#define NU_Release_Information RLC_Release_Information +#define NU_License_Information LIC_License_Information +#define NU_Disable_History_Saving HIC_Disable_History_Saving +#define NU_Enable_History_Saving HIC_Enable_History_Saving +#define NU_Make_History_Entry HIC_Make_History_Entry_Service +#define NU_Retrieve_History_Entry HIC_Retrieve_History_Entry +#define NU_Create_Driver IOCE_Create_Driver +#define NU_Delete_Driver IOCE_Delete_Driver +#define NU_Request_Driver IOCE_Request_Driver +#define NU_Resume_Driver IOCE_Resume_Driver +#define NU_Suspend_Driver IOCE_Suspend_Driver +#define NU_Established_Drivers IOF_Established_Drivers +#define NU_Driver_Pointers IOF_Driver_Pointers +#endif + + +/* Define task control functions. */ + +STATUS NU_Create_Task(NU_TASK *task, CHAR *name, + VOID (*task_entry)(UNSIGNED, VOID *), UNSIGNED argc, + VOID *argv, VOID *stack_address, UNSIGNED stack_size, + OPTION priority, UNSIGNED time_slice, + OPTION preempt, OPTION auto_start); +STATUS NU_Delete_Task(NU_TASK *task); +STATUS NU_Reset_Task(NU_TASK *task, UNSIGNED argc, VOID *argv); +STATUS NU_Terminate_Task(NU_TASK *task); +STATUS NU_Resume_Task(NU_TASK *task); +STATUS NU_Suspend_Task(NU_TASK *task); +VOID NU_Relinquish(VOID); +VOID NU_Sleep(UNSIGNED ticks); +OPTION NU_Change_Priority(NU_TASK *task, OPTION new_priority); +OPTION NU_Change_Preemption(OPTION preempt); +UNSIGNED NU_Change_Time_Slice(NU_TASK *task, UNSIGNED time_slice); +UNSIGNED NU_Check_Stack(VOID); +NU_TASK *NU_Current_Task_Pointer(VOID); +UNSIGNED NU_Established_Tasks(VOID); +STATUS NU_Task_Information(NU_TASK *task, CHAR *name, + DATA_ELEMENT *status, UNSIGNED *scheduled_count, + OPTION *priority, OPTION *preempt, + UNSIGNED *time_slice, VOID **stack_base, + UNSIGNED *stack_size, UNSIGNED *minimum_stack); +UNSIGNED NU_Task_Pointers(NU_TASK **pointer_list, + UNSIGNED maximum_pointers); + +/* Define Mailbox management functions. */ + +STATUS NU_Create_Mailbox(NU_MAILBOX *mailbox, CHAR *name, + OPTION suspend_type); +STATUS NU_Delete_Mailbox(NU_MAILBOX *mailbox); +STATUS NU_Reset_Mailbox(NU_MAILBOX *mailbox); +STATUS NU_Send_To_Mailbox(NU_MAILBOX *mailbox, VOID *message, + UNSIGNED suspend); +STATUS NU_Broadcast_To_Mailbox(NU_MAILBOX *mailbox, VOID *message, + UNSIGNED suspend); +STATUS NU_Receive_From_Mailbox(NU_MAILBOX *mailbox, VOID *message, + UNSIGNED suspend); +UNSIGNED NU_Established_Mailboxes(VOID); +STATUS NU_Mailbox_Information(NU_MAILBOX *mailbox, CHAR *name, + OPTION *suspend_type, OPTION *message_present, + UNSIGNED *tasks_waiting, NU_TASK **first_task); +UNSIGNED MBC_Mailbox_Pointers(NU_MAILBOX **pointer_list, + UNSIGNED maximum_pointers); + +/* Define Queue management functions. */ + +STATUS NU_Create_Queue(NU_QUEUE *queue, CHAR *name, + VOID *start_address, UNSIGNED queue_size, + OPTION message_type, UNSIGNED message_size, + OPTION suspend_type); +STATUS NU_Delete_Queue(NU_QUEUE *queue); +STATUS NU_Reset_Queue(NU_QUEUE *queue); +STATUS NU_Send_To_Front_Of_Queue(NU_QUEUE *queue, VOID *message, + UNSIGNED size, UNSIGNED suspend); +STATUS NU_Send_To_Queue(NU_QUEUE *queue, VOID *message, + UNSIGNED size, UNSIGNED suspend); +STATUS NU_Broadcast_To_Queue(NU_QUEUE *queue, VOID *message, + UNSIGNED size, UNSIGNED suspend); +STATUS NU_Receive_From_Queue(NU_QUEUE *queue, VOID *message, + UNSIGNED size, UNSIGNED *actual_size, UNSIGNED suspend); +UNSIGNED NU_Established_Queues(VOID); +STATUS NU_Queue_Information(NU_QUEUE *queue, CHAR *name, + VOID **start_address, UNSIGNED *queue_size, + UNSIGNED *available, UNSIGNED *messages, + OPTION *message_type, UNSIGNED *message_size, + OPTION *suspend_type, UNSIGNED *tasks_waiting, + NU_TASK **first_task); +UNSIGNED NU_Queue_Pointers(NU_QUEUE **pointer_list, + UNSIGNED maximum_pointers); + +/* Define Pipe management functions. */ + +STATUS NU_Create_Pipe(NU_PIPE *pipe, CHAR *name, + VOID *start_address, UNSIGNED pipe_size, + OPTION message_type, UNSIGNED message_size, + OPTION suspend_type); +STATUS NU_Delete_Pipe(NU_PIPE *pipe); +STATUS NU_Reset_Pipe(NU_PIPE *pipe); +STATUS NU_Send_To_Front_Of_Pipe(NU_PIPE *pipe, VOID *message, + UNSIGNED size, UNSIGNED suspend); +STATUS NU_Send_To_Pipe(NU_PIPE *pipe, VOID *message, + UNSIGNED size, UNSIGNED suspend); +STATUS NU_Broadcast_To_Pipe(NU_PIPE *pipe, VOID *message, + UNSIGNED size, UNSIGNED suspend); +STATUS NU_Receive_From_Pipe(NU_PIPE *pipe, VOID *message, + UNSIGNED size, UNSIGNED *actual_size, UNSIGNED suspend); +UNSIGNED NU_Established_Pipes(VOID); +STATUS NU_Pipe_Information(NU_PIPE *pipe, CHAR *name, + VOID **start_address, UNSIGNED *pipe_size, + UNSIGNED *available, UNSIGNED *messages, + OPTION *message_type, UNSIGNED *message_size, + OPTION *suspend_type, UNSIGNED *tasks_waiting, + NU_TASK **first_task); +UNSIGNED NU_Pipe_Pointers(NU_PIPE **pointer_list, + UNSIGNED maximum_pointers); + +/* Define Semaphore management functions. */ + +STATUS NU_Create_Semaphore(NU_SEMAPHORE *semaphore, CHAR *name, + UNSIGNED initial_count, OPTION suspend_type); +STATUS NU_Delete_Semaphore(NU_SEMAPHORE *semaphore); +STATUS NU_Reset_Semaphore(NU_SEMAPHORE *semaphore, + UNSIGNED initial_count); +STATUS NU_Obtain_Semaphore(NU_SEMAPHORE *semaphore, UNSIGNED suspend); +STATUS NU_Release_Semaphore(NU_SEMAPHORE *semaphore); +UNSIGNED NU_Established_Semaphores(VOID); +STATUS NU_Semaphore_Information(NU_SEMAPHORE *semaphore, CHAR *name, + UNSIGNED *current_count, OPTION *suspend_type, + UNSIGNED *tasks_waiting, NU_TASK **first_task); +UNSIGNED NU_Semaphore_Pointers(NU_SEMAPHORE **pointer_list, + UNSIGNED maximum_pointers); + +/* Define Event Group management functions. */ + +STATUS NU_Create_Event_Group(NU_EVENT_GROUP *group, CHAR *name); +STATUS NU_Delete_Event_Group(NU_EVENT_GROUP *group); +STATUS NU_Set_Events(NU_EVENT_GROUP *group, UNSIGNED events, + OPTION operation); +STATUS NU_Retrieve_Events(NU_EVENT_GROUP *group, + UNSIGNED requested_flags, OPTION operation, + UNSIGNED *retrieved_flags, UNSIGNED suspend); +UNSIGNED NU_Established_Event_Groups(VOID); +STATUS NU_Event_Group_Information(NU_EVENT_GROUP *group, CHAR *name, + UNSIGNED *event_flags, UNSIGNED *tasks_waiting, + NU_TASK **first_task); +UNSIGNED NU_Event_Group_Pointers(NU_EVENT_GROUP **pointer_list, + UNSIGNED maximum_pointers); + +/* Define Signal processing functions. */ + +UNSIGNED NU_Control_Signals(UNSIGNED signal_enable_mask); +UNSIGNED NU_Receive_Signals(VOID); +STATUS NU_Register_Signal_Handler(VOID (*signal_handler)(UNSIGNED)); +STATUS NU_Send_Signals(NU_TASK *task, UNSIGNED signals); + +/* Define Partition memory management functions. */ + +STATUS NU_Create_Partition_Pool(NU_PARTITION_POOL *pool, CHAR *name, + VOID *start_address, UNSIGNED pool_size, + UNSIGNED partition_size, OPTION suspend_type); +STATUS NU_Delete_Partition_Pool(NU_PARTITION_POOL *pool); +STATUS NU_Allocate_Partition(NU_PARTITION_POOL *pool, + VOID **return_pointer, UNSIGNED suspend); +STATUS NU_Deallocate_Partition(VOID *partition); +UNSIGNED NU_Established_Partition_Pools(VOID); +STATUS NU_Partition_Pool_Information(NU_PARTITION_POOL *pool, + CHAR *name, + VOID **start_address, UNSIGNED *pool_size, + UNSIGNED *partition_size, UNSIGNED *available, + UNSIGNED *allocated, OPTION *suspend_type, + UNSIGNED *tasks_waiting, NU_TASK **first_task); +UNSIGNED NU_Partition_Pool_Pointers(NU_PARTITION_POOL **pointer_list, + UNSIGNED maximum_pointers); + +/* Define Dynamic memory management functions. */ + +STATUS NU_Create_Memory_Pool(NU_MEMORY_POOL *pool, CHAR *name, + VOID *start_address, UNSIGNED pool_size, + UNSIGNED min_allocation, OPTION suspend_type); +STATUS NU_Delete_Memory_Pool(NU_MEMORY_POOL *pool); +STATUS NU_Allocate_Memory(NU_MEMORY_POOL *pool, VOID **return_pointer, + UNSIGNED size, UNSIGNED suspend); +STATUS NU_Deallocate_Memory(VOID *memory); +UNSIGNED NU_Established_Memory_Pools(VOID); +STATUS NU_Memory_Pool_Information(NU_MEMORY_POOL *pool, CHAR *name, + VOID **start_address, UNSIGNED *pool_size, + UNSIGNED *min_allocation, UNSIGNED *available, + OPTION *suspend_type, UNSIGNED *tasks_waiting, + NU_TASK **first_task); +UNSIGNED NU_Memory_Pool_Pointers(NU_MEMORY_POOL **pointer_list, + UNSIGNED maximum_pointers); + +/* Define Interrupt management functions. */ + +INT NU_Control_Interrupts(INT new_level); +INT NU_Local_Control_Interrupts(INT new_level); +VOID NU_Restore_Interrupts(VOID); +VOID *NU_Setup_Vector(INT vector, VOID *new_vector); +STATUS NU_Register_LISR(INT vector, + VOID (*new_lisr)(INT), + VOID (**old_lisr)(INT)); +STATUS NU_Activate_HISR(NU_HISR *hisr); +STATUS NU_Create_HISR(NU_HISR *hisr, CHAR *name, + VOID (*hisr_entry)(VOID), OPTION priority, + VOID *stack_address, UNSIGNED stack_size); +STATUS NU_Delete_HISR(NU_HISR *hisr); +NU_HISR *NU_Current_HISR_Pointer(VOID); +UNSIGNED NU_Established_HISRs(VOID); +STATUS NU_HISR_Information(NU_HISR *hisr, CHAR *name, + UNSIGNED *scheduled_count, DATA_ELEMENT *priority, + VOID **stack_base, UNSIGNED *stack_size, + UNSIGNED *minimum_stack); +UNSIGNED NU_HISR_Pointers(NU_HISR **pointer_list, + UNSIGNED maximum_pointers); +VOID NU_Protect(NU_PROTECT *protect_struct); +VOID NU_Unprotect(VOID); + +/* Timer management functions. */ + +STATUS NU_Create_Timer(NU_TIMER *timer, CHAR *name, + VOID (*expiration_routine)(UNSIGNED), UNSIGNED id, + UNSIGNED initial_time, UNSIGNED reschedule_time, + OPTION enable); +STATUS NU_Delete_Timer(NU_TIMER *timer); +STATUS NU_Reset_Timer(NU_TIMER *timer, + VOID (*expiration_routine)(UNSIGNED), + UNSIGNED initial_time, UNSIGNED reschedule_timer, + OPTION enable); +STATUS NU_Control_Timer(NU_TIMER *timer, OPTION enable); +UNSIGNED NU_Established_Timers(VOID); +STATUS NU_Timer_Information(NU_TIMER *timer, CHAR *name, + OPTION *enable, UNSIGNED *expirations, UNSIGNED *id, + UNSIGNED *initial_time, UNSIGNED *reschedule_time); +UNSIGNED NU_Timer_Pointers(NU_TIMER **pointer_list, + UNSIGNED maximum_pointers); +VOID NU_Set_Clock(UNSIGNED new_value); +UNSIGNED NU_Retrieve_Clock(VOID); + +/* Development support functions. */ + +CHAR *NU_Release_Information(VOID); +CHAR *NU_License_Information(VOID); +VOID NU_Disable_History_Saving(VOID); +VOID NU_Enable_History_Saving(VOID); +VOID NU_Make_History_Entry(UNSIGNED param1, UNSIGNED param2, + UNSIGNED param3); +STATUS NU_Retrieve_History_Entry(DATA_ELEMENT *id, + UNSIGNED *param1, UNSIGNED *param2, UNSIGNED *param3, + UNSIGNED *time, NU_TASK **task, NU_HISR **hisr); + +/* Input/Output Driver functions. */ + +STATUS NU_Create_Driver(NU_DRIVER *driver, CHAR *name, + VOID (*driver_entry)(NU_DRIVER *, NU_DRIVER_REQUEST *)); +STATUS NU_Delete_Driver(NU_DRIVER *driver); +STATUS NU_Request_Driver(NU_DRIVER *driver, + NU_DRIVER_REQUEST *request); +STATUS NU_Resume_Driver(NU_TASK *task); +STATUS NU_Suspend_Driver(VOID (*terminate_routine)(VOID *), + VOID *information, UNSIGNED timeout); +UNSIGNED NU_Established_Drivers(VOID); +UNSIGNED NU_Driver_Pointers(NU_DRIVER **pointer_list, + UNSIGNED maximum_pointers); + +#endif + +#ifdef __cplusplus +} /* End of C declarations */ +#endif + +#endif /* !NUCLEUS */ + diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/old/pi_defs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gpf/inc/nuc/old/pi_defs.h Sun Jul 15 21:02:08 2018 +0000 @@ -0,0 +1,122 @@ +/*************************************************************************/ +/* */ +/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ +/* */ +/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, */ +/* use, and sales rights pertaining to this subject matter are governed */ +/* by the license agreement. The recipient of this software implicitly */ +/* accepts the terms of the license. */ +/* */ +/*************************************************************************/ + +/*************************************************************************/ +/* */ +/* FILE NAME VERSION */ +/* */ +/* pi_defs.h PLUS 1.2 */ +/* */ +/* COMPONENT */ +/* */ +/* PI - Pipe Management */ +/* */ +/* DESCRIPTION */ +/* */ +/* This file contains data structure definitions and constants for */ +/* the message Pipe component. */ +/* */ +/* AUTHOR */ +/* */ +/* William E. Lamie, Accelerated Technology, Inc. */ +/* */ +/* DATA STRUCTURES */ +/* */ +/* PI_PCB Pipe control block */ +/* PI_SUSPEND Pipe suspension block */ +/* */ +/* FUNCTIONS */ +/* */ +/* None */ +/* */ +/* DEPENDENCIES */ +/* */ +/* cs_defs.h Common service definitions */ +/* tc_defs.h Thread Control definitions */ +/* */ +/* HISTORY */ +/* */ +/* NAME DATE REMARKS */ +/* */ +/* W. Lamie 03-01-1993 Created initial version 1.0 */ +/* D. Lamie 04-19-1993 Verified version 1.0 */ +/* W. Lamie 03-01-1994 Moved include files outside of */ +/* the file #ifndef to allow the */ +/* use of actual data structures, */ +/* removed protection structure, */ +/* put padding into structure, */ +/* resulting in version 1.1 */ +/* R. Pfaff - */ +/* D. Lamie 03-18-1994 Verified version 1.1 */ +/* M.Q. Qian 04-17-1996 updated to version 1.2 */ +/* */ +/*************************************************************************/ + +#include "cs_defs.h" /* Common service constants */ +#include "tc_defs.h" /* Thread control constants */ + + +/* Check to see if the file has been included already. */ + +#ifndef PI_DEFS +#define PI_DEFS + + +/* Define constants local to this component. */ + +#define PI_PIPE_ID 0x50495045UL + + +/* Define the Pipe Control Block data type. */ + +typedef struct PI_PCB_STRUCT +{ + CS_NODE pi_created; /* Node for linking to */ + /* created pipe list */ + UNSIGNED pi_id; /* Internal PCB ID */ + CHAR pi_name[NU_MAX_NAME]; /* Pipe name */ + DATA_ELEMENT pi_fixed_size; /* Fixed-size messages? */ + DATA_ELEMENT pi_fifo_suspend; /* Suspension type flag */ +#if PAD_2 + DATA_ELEMENT pi_padding[PAD_2]; +#endif + UNSIGNED pi_pipe_size; /* Total size of pipe */ + UNSIGNED pi_messages; /* Messages in pipe */ + UNSIGNED pi_message_size; /* Size of each message */ + UNSIGNED pi_available; /* Available bytes */ + BYTE_PTR pi_start; /* Start of pipe area */ + BYTE_PTR pi_end; /* End of pipe area + 1 */ + BYTE_PTR pi_read; /* Read pointer */ + BYTE_PTR pi_write; /* Write pointer */ + UNSIGNED pi_tasks_waiting; /* Number of waiting tasks*/ + struct PI_SUSPEND_STRUCT + *pi_urgent_list; /* Urgent message suspend */ + struct PI_SUSPEND_STRUCT + *pi_suspension_list; /* Suspension list */ +} PI_PCB; + + +/* Define the Pipe suspension structure. This structure is allocated off of + the caller's stack. */ + +typedef struct PI_SUSPEND_STRUCT +{ + CS_NODE pi_suspend_link; /* Link to suspend blocks */ + PI_PCB *pi_pipe; /* Pointer to the pipe */ + TC_TCB *pi_suspended_task; /* Task suspended */ + BYTE_PTR pi_message_area; /* Pointer to message area*/ + UNSIGNED pi_message_size; /* Message size requested */ + UNSIGNED pi_actual_size; /* Actual size of message */ + STATUS pi_return_status; /* Return status */ +} PI_SUSPEND; + +#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/old/pm_defs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gpf/inc/nuc/old/pm_defs.h Sun Jul 15 21:02:08 2018 +0000 @@ -0,0 +1,131 @@ +/*************************************************************************/ +/* */ +/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ +/* */ +/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, */ +/* use, and sales rights pertaining to this subject matter are governed */ +/* by the license agreement. The recipient of this software implicitly */ +/* accepts the terms of the license. */ +/* */ +/*************************************************************************/ + +/*************************************************************************/ +/* */ +/* FILE NAME VERSION */ +/* */ +/* pm_defs.h PLUS 1.2 */ +/* */ +/* COMPONENT */ +/* */ +/* PM - Partition Memory Management */ +/* */ +/* DESCRIPTION */ +/* */ +/* This file contains data structure definitions and constants for */ +/* the Partition Memory component. */ +/* */ +/* AUTHOR */ +/* */ +/* William E. Lamie, Accelerated Technology, Inc. */ +/* */ +/* DATA STRUCTURES */ +/* */ +/* PM_PCB Partition Pool control block */ +/* PM_HEADER Header of each partition */ +/* PM_SUSPEND Partition suspension block */ +/* */ +/* FUNCTIONS */ +/* */ +/* None */ +/* */ +/* DEPENDENCIES */ +/* */ +/* cs_defs.h Common service definitions */ +/* tc_defs.h Thread Control definitions */ +/* */ +/* HISTORY */ +/* */ +/* NAME DATE REMARKS */ +/* */ +/* W. Lamie 03-01-1993 Created initial version 1.0 */ +/* D. Lamie 04-19-1993 Verified version 1.0 */ +/* W. Lamie 03-01-1994 Moved include files outside of */ +/* the file #ifndef to allow the */ +/* use of actual data structures, */ +/* removed protect structure, */ +/* added padding logic, */ +/* resulting in version 1.1 */ +/* R. Pfaff - */ +/* D. Lamie 03-18-1994 Verified version 1.1 */ +/* M.Q. Qian 04-17-1996 updated to version 1.2 */ +/* */ +/*************************************************************************/ + +#include "cs_defs.h" /* Common service constants */ +#include "tc_defs.h" /* Thread control constants */ + + +/* Check to see if the file has been included already. */ + +#ifndef PM_DEFS +#define PM_DEFS + + +/* Define constants local to this component. */ + +#define PM_PARTITION_ID 0x50415254UL +#define PM_OVERHEAD ((sizeof(PM_HEADER) + sizeof(UNSIGNED) \ + - 1)/sizeof(UNSIGNED)) * \ + sizeof(UNSIGNED) + + +/* Define the Partition Pool Control Block data type. */ + +typedef struct PM_PCB_STRUCT +{ + CS_NODE pm_created; /* Node for linking to */ + /* created partition list */ + UNSIGNED pm_id; /* Internal PCB ID */ + CHAR pm_name[NU_MAX_NAME]; /* Partition Pool name */ + VOID *pm_start_address; /* Starting pool address */ + UNSIGNED pm_pool_size; /* Size of pool */ + UNSIGNED pm_partition_size; /* Size of each partition */ + UNSIGNED pm_available; /* Available partitions */ + UNSIGNED pm_allocated; /* Allocated partitions */ + struct PM_HEADER_STRUCT + *pm_available_list; /* Available list */ + DATA_ELEMENT pm_fifo_suspend; /* Suspension type flag */ +#if PAD_1 + DATA_ELEMENT pm_padding[PAD_1]; +#endif + UNSIGNED pm_tasks_waiting; /* Number of waiting tasks*/ + struct PM_SUSPEND_STRUCT + *pm_suspension_list; /* Suspension list */ +} PM_PCB; + + +/* Define the header structure that is in front of each memory partition. */ + +typedef struct PM_HEADER_STRUCT +{ + struct PM_HEADER_STRUCT + *pm_next_available; /* Next available memory */ + /* partition */ + PM_PCB *pm_partition_pool; /* Partition pool pointer */ +} PM_HEADER; + + +/* Define the partition suspension structure. This structure is allocated + off of the caller's stack. */ + +typedef struct PM_SUSPEND_STRUCT +{ + CS_NODE pm_suspend_link; /* Link to suspend blocks */ + PM_PCB *pm_partition_pool; /* Pointer to pool */ + TC_TCB *pm_suspended_task; /* Task suspended */ + VOID *pm_return_pointer; /* Return memory address */ + STATUS pm_return_status; /* Return status */ +} PM_SUSPEND; + +#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/old/qu_defs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gpf/inc/nuc/old/qu_defs.h Sun Jul 15 21:02:08 2018 +0000 @@ -0,0 +1,122 @@ +/*************************************************************************/ +/* */ +/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ +/* */ +/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, */ +/* use, and sales rights pertaining to this subject matter are governed */ +/* by the license agreement. The recipient of this software implicitly */ +/* accepts the terms of the license. */ +/* */ +/*************************************************************************/ + +/*************************************************************************/ +/* */ +/* FILE NAME VERSION */ +/* */ +/* qu_defs.h PLUS 1.2 */ +/* */ +/* COMPONENT */ +/* */ +/* QU - Queue Management */ +/* */ +/* DESCRIPTION */ +/* */ +/* This file contains data structure definitions and constants for */ +/* the message Queue component. */ +/* */ +/* AUTHOR */ +/* */ +/* William E. Lamie, Accelerated Technology, Inc. */ +/* */ +/* DATA STRUCTURES */ +/* */ +/* QU_QCB Queue control block */ +/* QU_SUSPEND Queue suspension block */ +/* */ +/* FUNCTIONS */ +/* */ +/* None */ +/* */ +/* DEPENDENCIES */ +/* */ +/* cs_defs.h Common service definitions */ +/* tc_defs.h Thread Control definitions */ +/* */ +/* HISTORY */ +/* */ +/* NAME DATE REMARKS */ +/* */ +/* W. Lamie 03-01-1993 Created initial version 1.0 */ +/* D. Lamie 04-19-1993 Verified version 1.0 */ +/* W. Lamie 03-01-1994 Moved include files outside of */ +/* the file #ifndef to allow the */ +/* use of actual data structures, */ +/* removed protection structure, */ +/* put padding into structure, */ +/* resulting in version 1.1 */ +/* R. Pfaff - */ +/* D. Lamie 03-18-1994 Verified version 1.1 */ +/* M.Q. Qian 04-17-1996 updated to version 1.2 */ +/* */ +/*************************************************************************/ + +#include "cs_defs.h" /* Common service constants */ +#include "tc_defs.h" /* Thread control constants */ + + +/* Check to see if the file has been included already. */ + +#ifndef QU_DEFS +#define QU_DEFS + + +/* Define constants local to this component. */ + +#define QU_QUEUE_ID 0x51554555UL + + +/* Define the Queue Control Block data type. */ + +typedef struct QU_QCB_STRUCT +{ + CS_NODE qu_created; /* Node for linking to */ + /* created queue list */ + UNSIGNED qu_id; /* Internal QCB ID */ + CHAR qu_name[NU_MAX_NAME]; /* Queue name */ + DATA_ELEMENT qu_fixed_size; /* Fixed-size messages? */ + DATA_ELEMENT qu_fifo_suspend; /* Suspension type flag */ +#if PAD_2 + DATA_ELEMENT qu_padding[PAD_2]; +#endif + UNSIGNED qu_queue_size; /* Total size of queue */ + UNSIGNED qu_messages; /* Messages in queue */ + UNSIGNED qu_message_size; /* Size of each message */ + UNSIGNED qu_available; /* Available words */ + UNSIGNED_PTR qu_start; /* Start of queue area */ + UNSIGNED_PTR qu_end; /* End of queue area + 1 */ + UNSIGNED_PTR qu_read; /* Read pointer */ + UNSIGNED_PTR qu_write; /* Write pointer */ + UNSIGNED qu_tasks_waiting; /* Number of waiting tasks*/ + struct QU_SUSPEND_STRUCT + *qu_urgent_list; /* Urgent message suspend */ + struct QU_SUSPEND_STRUCT + *qu_suspension_list; /* Suspension list */ +} QU_QCB; + + +/* Define the queue suspension structure. This structure is allocated off of + the caller's stack. */ + +typedef struct QU_SUSPEND_STRUCT +{ + CS_NODE qu_suspend_link; /* Link to suspend blocks */ + QU_QCB *qu_queue; /* Pointer to the queue */ + TC_TCB *qu_suspended_task; /* Task suspended */ + UNSIGNED_PTR qu_message_area; /* Pointer to message area*/ + UNSIGNED qu_message_size; /* Message size requested */ + UNSIGNED qu_actual_size; /* Actual size of message */ + STATUS qu_return_status; /* Return status */ +} QU_SUSPEND; + +#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/old/sm_defs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gpf/inc/nuc/old/sm_defs.h Sun Jul 15 21:02:08 2018 +0000 @@ -0,0 +1,109 @@ +/*************************************************************************/ +/* */ +/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ +/* */ +/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, */ +/* use, and sales rights pertaining to this subject matter are governed */ +/* by the license agreement. The recipient of this software implicitly */ +/* accepts the terms of the license. */ +/* */ +/*************************************************************************/ + +/*************************************************************************/ +/* */ +/* FILE NAME VERSION */ +/* */ +/* sm_defs.h PLUS 1.2 */ +/* */ +/* COMPONENT */ +/* */ +/* SM - Semaphore Management */ +/* */ +/* DESCRIPTION */ +/* */ +/* This file contains data structure definitions and constants for */ +/* the Semaphore component. */ +/* */ +/* AUTHOR */ +/* */ +/* William E. Lamie, Accelerated Technology, Inc. */ +/* */ +/* DATA STRUCTURES */ +/* */ +/* SM_SCB Semaphore control block */ +/* SM_SUSPEND Semaphore suspension block */ +/* */ +/* FUNCTIONS */ +/* */ +/* None */ +/* */ +/* DEPENDENCIES */ +/* */ +/* cs_defs.h Common service definitions */ +/* tc_defs.h Thread Control definitions */ +/* */ +/* HISTORY */ +/* */ +/* NAME DATE REMARKS */ +/* */ +/* W. Lamie 03-01-1993 Created initial version 1.0 */ +/* D. Lamie 04-19-1993 Verified version 1.0 */ +/* W. Lamie 03-01-1994 Moved include files outside of */ +/* the file #ifndef to allow the */ +/* use of actual data structures, */ +/* removed protection structure, */ +/* put padding into structure, */ +/* resulting in version 1.1 */ +/* R. Pfaff - */ +/* D. Lamie 03-18-1994 Verified version 1.1 */ +/* M.Q. Qian 04-17-1996 updated to version 1.2 */ +/* */ +/*************************************************************************/ + +#include "cs_defs.h" /* Common service constants */ +#include "tc_defs.h" /* Thread control constants */ + + +/* Check to see if the file has been included already. */ + +#ifndef SM_DEFS +#define SM_DEFS + + +/* Define constants local to this component. */ + +#define SM_SEMAPHORE_ID 0x53454d41UL + + +/* Define the Semaphore Control Block data type. */ + +typedef struct SM_SCB_STRUCT +{ + CS_NODE sm_created; /* Node for linking to */ + /* created semaphore list */ + UNSIGNED sm_id; /* Internal SCB ID */ + CHAR sm_name[NU_MAX_NAME]; /* Semaphore name */ + UNSIGNED sm_semaphore_count; /* Counting semaphore */ + DATA_ELEMENT sm_fifo_suspend; /* Suspension type flag */ +#if PAD_1 + DATA_ELEMENT sm_padding[PAD_1]; +#endif + UNSIGNED sm_tasks_waiting; /* Number of waiting tasks*/ + struct SM_SUSPEND_STRUCT + *sm_suspension_list; /* Suspension list */ +} SM_SCB; + + +/* Define the semaphore suspension structure. This structure is allocated + off of the caller's stack. */ + +typedef struct SM_SUSPEND_STRUCT +{ + CS_NODE sm_suspend_link; /* Link to suspend blocks */ + SM_SCB *sm_semaphore; /* Pointer to semaphore */ + TC_TCB *sm_suspended_task; /* Task suspended */ + STATUS sm_return_status; /* Return status */ +} SM_SUSPEND; + +#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/old/tc_defs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gpf/inc/nuc/old/tc_defs.h Sun Jul 15 21:02:08 2018 +0000 @@ -0,0 +1,234 @@ +/*************************************************************************/ +/* */ +/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ +/* */ +/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, */ +/* use, and sales rights pertaining to this subject matter are governed */ +/* by the license agreement. The recipient of this software implicitly */ +/* accepts the terms of the license. */ +/* */ +/*************************************************************************/ + +/*************************************************************************/ +/* */ +/* FILE NAME VERSION */ +/* */ +/* tc_defs.h PLUS/MNT */ +/* VERSION 1.1 */ +/* COMPONENT */ +/* */ +/* TC - Thread Control */ +/* */ +/* DESCRIPTION */ +/* */ +/* This file contains data structure definitions and constants for */ +/* the component that controls the various threads of execution in */ +/* system. Threads include tasks, HISRs, signal handlers, etc. */ +/* */ +/* AUTHOR */ +/* */ +/* William E. Lamie, Accelerated Technology, Inc. */ +/* */ +/* DATA STRUCTURES */ +/* */ +/* TC_TCB Task Control Block */ +/* TC_HCB HISR Control Block */ +/* TC_PROTECT Task/HISR protection struct */ +/* */ +/* FUNCTIONS */ +/* */ +/* None */ +/* */ +/* DEPENDENCIES */ +/* */ +/* cs_defs.h Common service definitions */ +/* tm_defs.h Timer control definitions */ +/* */ +/* HISTORY */ +/* */ +/* NAME DATE REMARKS */ +/* */ +/* W. Lamie 03-01-1993 Created initial version 1.0 */ +/* D. Lamie 04-19-1993 Verified version 1.0 */ +/* W. Lamie 06-01-1993 Added padding conditional into */ +/* TC_TCB structure, making */ +/* version 1.0a */ +/* D. Lamie 06-01-1993 Verified version 1.0a */ +/* W. Lamie 03-01-1994 Moved include files outside of */ +/* the file #ifndef to allow the */ +/* use of actual data structures, */ +/* added four reserved words in */ +/* both the task and HISR blocks, */ +/* resulting in version 1.1 */ +/* R. Pfaff - */ +/* D. Lamie 03-18-1994 Verified version 1.1 */ +/* M.Q. Qian 04-17-1996 updated to version 1.2 */ +/* B. Haggerty 03-12-1997 Released MNT Version 1.0 */ +/* B. Haggerty 08-11-1997 Released MNT Version 1.1 */ +/* */ +/*************************************************************************/ + +#include "cs_defs.h" /* Common service constants */ +#include "tm_defs.h" /* Timer control structures */ + + +/* Check to see if the file has been included already. */ + +#ifndef TC_DEFS +#define TC_DEFS + + +/* Define constants local to this component. */ + +#define TC_TASK_ID 0x5441534bUL +#define TC_HISR_ID 0x48495352UL +#define TC_PRIORITIES 256 +#define TC_HISR_PRIORITIES 3 +#define TC_MAX_GROUPS TC_PRIORITIES/8 +#define TC_HIGHEST_MASK 0x000000FFUL +#define TC_NEXT_HIGHEST_MASK 0x0000FF00UL +#define TC_NEXT_LOWEST_MASK 0x00FF0000UL +#define TC_LOWEST_MASK 0xFF000000UL + +/* Define the Task Control Block data type. */ + +typedef struct TC_TCB_STRUCT +{ + /* Standard thread information first. This information is used by + the target dependent portion of this component. Changes made + to this area of the structure can have undesirable side effects. */ + + CS_NODE tc_created; /* Node for linking to */ + /* created task list */ + UNSIGNED tc_id; /* Internal TCB ID */ + CHAR tc_name[NU_MAX_NAME]; /* Task name */ + DATA_ELEMENT tc_status; /* Task status */ + DATA_ELEMENT tc_delayed_suspend; /* Delayed task suspension*/ + DATA_ELEMENT tc_priority; /* Task priority */ + DATA_ELEMENT tc_preemption; /* Task preemption enable */ + UNSIGNED tc_scheduled; /* Task scheduled count */ + UNSIGNED tc_cur_time_slice; /* Current time slice */ + VOID *tc_stack_start; /* Stack starting address */ + VOID *tc_stack_end; /* Stack ending address */ + VOID *tc_stack_pointer; /* Task stack pointer */ + UNSIGNED tc_stack_size; /* Task stack's size */ + UNSIGNED tc_stack_minimum; /* Minimum stack size */ + struct TC_PROTECT_STRUCT + *tc_current_protect; /* Current protection */ + VOID *tc_saved_stack_ptr; /* Previous stack pointer */ + UNSIGNED tc_time_slice; /* Task time slice value */ + + + /* Information after this point is not used in the target dependent + portion of this component. Hence, changes in the following section + should not impact assembly language routines. */ + struct TC_TCB_STRUCT + *tc_ready_previous, /* Previously ready TCB */ + *tc_ready_next; /* next and previous ptrs */ + + /* Task control information follows. */ + + UNSIGNED tc_priority_group; /* Priority group mask bit*/ + struct TC_TCB_STRUCT + **tc_priority_head; /* Pointer to list head */ + DATA_ELEMENT *tc_sub_priority_ptr; /* Pointer to sub-group */ + DATA_ELEMENT tc_sub_priority; /* Mask of sub-group bit */ + DATA_ELEMENT tc_saved_status; /* Previous task status */ + DATA_ELEMENT tc_signal_active; /* Signal active flag */ + +#if PAD_3 + DATA_ELEMENT tc_padding[PAD_3]; +#endif + + /* Task entry function */ + VOID (*tc_entry)(UNSIGNED, VOID *); + UNSIGNED tc_argc; /* Optional task argument */ + VOID *tc_argv; /* Optional task argument */ + VOID (*tc_cleanup) (VOID *);/* Clean-up routine */ + VOID *tc_cleanup_info; /* Clean-up information */ + struct TC_PROTECT_STRUCT + *tc_suspend_protect; /* Protection at time of */ + /* task suspension */ + + /* Task timer information. */ + INT tc_timer_active; /* Active timer flag */ + TM_TCB tc_timer_control; /* Timer control block */ + + /* Task signal control information. */ + + UNSIGNED tc_signals; /* Current signals */ + UNSIGNED tc_enabled_signals; /* Enabled signals */ + + /* tc_saved_status and tc_signal_active are now defined above in an + attempt to keep DATA_ELEMENT types together. */ + + /* Signal handling routine. */ + VOID (*tc_signal_handler) (UNSIGNED); + + /* Reserved words for the system and a single reserved word for the + application. */ + UNSIGNED tc_system_reserved_1; /* System reserved word */ + UNSIGNED tc_system_reserved_2; /* System reserved word */ + UNSIGNED tc_system_reserved_3; /* System reserved word */ + UNSIGNED tc_app_reserved_1; /* Application reserved */ + +} TC_TCB; + + +/* Define the High-Level Interrupt Service Routine Control Block data type. */ + +typedef struct TC_HCB_STRUCT +{ + /* Standard thread information first. This information is used by + the target dependent portion of this component. Changes made + to this area of the structure can have undesirable side effects. */ + + CS_NODE tc_created; /* Node for linking to */ + /* created task list */ + UNSIGNED tc_id; /* Internal TCB ID */ + CHAR tc_name[NU_MAX_NAME]; /* HISR name */ + DATA_ELEMENT tc_not_used_1; /* Not used field */ + DATA_ELEMENT tc_not_used_2; /* Not used field */ + DATA_ELEMENT tc_priority; /* HISR priority */ + DATA_ELEMENT tc_not_used_3; /* Not used field */ + UNSIGNED tc_scheduled; /* HISR scheduled count */ + UNSIGNED tc_cur_time_slice; /* Not used in HISR */ + VOID *tc_stack_start; /* Stack starting address */ + VOID *tc_stack_end; /* Stack ending address */ + VOID *tc_stack_pointer; /* HISR stack pointer */ + UNSIGNED tc_stack_size; /* HISR stack's size */ + UNSIGNED tc_stack_minimum; /* Minimum stack size */ + struct TC_PROTECT_STRUCT + *tc_current_protect; /* Current protection */ + struct TC_HCB_STRUCT + *tc_active_next; /* Next activated HISR */ + + /* Information after this point is not used in the target dependent + portion of this component. Hence, changes in the following section + should not impact assembly language routines. */ + UNSIGNED tc_activation_count; /* Activation counter */ + VOID (*tc_entry)(VOID); /* HISR entry function */ +/*#ifdef SUN */ + VOID (*tc_actual_entry)(); /* HISR entry function MNT 1.2 */ +/*#endif */ + + /* Reserved words for the system and a single reserved word for the + application. */ + UNSIGNED tc_system_reserved_1; /* System reserved word */ + UNSIGNED tc_system_reserved_2; /* System reserved word */ + UNSIGNED tc_system_reserved_3; /* System reserved word */ + UNSIGNED tc_app_reserved_1; /* Application reserved */ + +} TC_HCB; + + +/* Define the Task/HISR protection structure type. */ + +typedef struct TC_PROTECT_STRUCT +{ + TC_TCB *tc_tcb_pointer; /* Owner of the protection */ + UNSIGNED tc_thread_waiting; /* Waiting thread flag */ +} TC_PROTECT; + +#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/old/tm_defs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/gpf/inc/nuc/old/tm_defs.h Sun Jul 15 21:02:08 2018 +0000 @@ -0,0 +1,117 @@ +/*************************************************************************/ +/* */ +/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ +/* */ +/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ +/* subject matter of this material. All manufacturing, reproduction, */ +/* use, and sales rights pertaining to this subject matter are governed */ +/* by the license agreement. The recipient of this software implicitly */ +/* accepts the terms of the license. */ +/* */ +/*************************************************************************/ + +/*************************************************************************/ +/* */ +/* FILE NAME VERSION */ +/* */ +/* tm_defs.h PLUS 1.2 */ +/* */ +/* COMPONENT */ +/* */ +/* TM - Timer Management */ +/* */ +/* DESCRIPTION */ +/* */ +/* This file contains data structure definitions and constants for */ +/* the Timer Management component. */ +/* */ +/* AUTHOR */ +/* */ +/* William E. Lamie, Accelerated Technology, Inc. */ +/* */ +/* DATA STRUCTURES */ +/* */ +/* TM_TCB Timer control block */ +/* TM_APP_TCB Application timer control */ +/* block */ +/* */ +/* FUNCTIONS */ +/* */ +/* None */ +/* */ +/* DEPENDENCIES */ +/* */ +/* cs_defs.h Common service definitions */ +/* tc_defs.h Thread control definitions */ +/* */ +/* HISTORY */ +/* */ +/* NAME DATE REMARKS */ +/* */ +/* W. Lamie 03-01-1993 Created initial version 1.0 */ +/* D. Lamie 04-19-1993 Verified version 1.0 */ +/* W. Lamie 03-01-1994 Moved include files outside of */ +/* the file #ifndef to allow the */ +/* use of actual data structures, */ +/* resulting in version 1.1 */ +/* R. Pfaff - */ +/* D. Lamie 03-18-1994 Verified version 1.1 */ +/* M.Q. Qian 04-17-1996 updated to version 1.2 */ +/* */ +/*************************************************************************/ + +#include "cs_defs.h" /* Common service constants */ + + +/* Check to see if the file has been included already. */ + +#ifndef TM_DEFS +#define TM_DEFS + + +/* Define constants local to this component. */ + +#define TM_TIMER_ID 0x54494d45UL +#define TM_ACTIVE 0 +#define TM_NOT_ACTIVE 1 +#define TM_EXPIRED 2 +#define TM_TASK_TIMER 0 +#define TM_APPL_TIMER 1 + +/* Define the Timer Control Block data type. */ + +typedef struct TM_TCB_STRUCT +{ + INT tm_timer_type; /* Application/Task */ + UNSIGNED tm_remaining_time; /* Remaining time */ + VOID *tm_information; /* Information pointer */ + struct TM_TCB_STRUCT + *tm_next_timer, /* Next timer in list */ + *tm_previous_timer; /* Previous timer in list*/ +} TM_TCB; + + +/* Define Application's Timer Control Block data type. */ + +typedef struct TM_APP_TCB_STRUCT +{ + CS_NODE tm_created; /* Node for linking to */ + /* created timer list */ + UNSIGNED tm_id; /* Internal TCB ID */ + CHAR tm_name[NU_MAX_NAME]; /* Timer name */ + VOID (*tm_expiration_routine)(UNSIGNED); /* Expiration function */ + UNSIGNED tm_expiration_id; /* Expiration ID */ + INT tm_enabled; /* Timer enabled flag */ + UNSIGNED tm_expirations; /* Number of expirations */ + UNSIGNED tm_initial_time; /* Initial time */ + UNSIGNED tm_reschedule_time; /* Reschedule time */ + TM_TCB tm_actual_timer; /* Actual timer internals*/ +} TM_APP_TCB; + + +/* Include this file here, since it contains references to the timer definition + structure that is defined by this file. */ + +#include "tc_defs.h" + +#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/pi_defs.h --- a/src/gpf/inc/nuc/pi_defs.h Sun Jul 15 20:57:33 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/*************************************************************************/ -/* */ -/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ -/* */ -/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ -/* subject matter of this material. All manufacturing, reproduction, */ -/* use, and sales rights pertaining to this subject matter are governed */ -/* by the license agreement. The recipient of this software implicitly */ -/* accepts the terms of the license. */ -/* */ -/*************************************************************************/ - -/*************************************************************************/ -/* */ -/* FILE NAME VERSION */ -/* */ -/* pi_defs.h PLUS 1.2 */ -/* */ -/* COMPONENT */ -/* */ -/* PI - Pipe Management */ -/* */ -/* DESCRIPTION */ -/* */ -/* This file contains data structure definitions and constants for */ -/* the message Pipe component. */ -/* */ -/* AUTHOR */ -/* */ -/* William E. Lamie, Accelerated Technology, Inc. */ -/* */ -/* DATA STRUCTURES */ -/* */ -/* PI_PCB Pipe control block */ -/* PI_SUSPEND Pipe suspension block */ -/* */ -/* FUNCTIONS */ -/* */ -/* None */ -/* */ -/* DEPENDENCIES */ -/* */ -/* cs_defs.h Common service definitions */ -/* tc_defs.h Thread Control definitions */ -/* */ -/* HISTORY */ -/* */ -/* NAME DATE REMARKS */ -/* */ -/* W. Lamie 03-01-1993 Created initial version 1.0 */ -/* D. Lamie 04-19-1993 Verified version 1.0 */ -/* W. Lamie 03-01-1994 Moved include files outside of */ -/* the file #ifndef to allow the */ -/* use of actual data structures, */ -/* removed protection structure, */ -/* put padding into structure, */ -/* resulting in version 1.1 */ -/* R. Pfaff - */ -/* D. Lamie 03-18-1994 Verified version 1.1 */ -/* M.Q. Qian 04-17-1996 updated to version 1.2 */ -/* */ -/*************************************************************************/ - -#include "cs_defs.h" /* Common service constants */ -#include "tc_defs.h" /* Thread control constants */ - - -/* Check to see if the file has been included already. */ - -#ifndef PI_DEFS -#define PI_DEFS - - -/* Define constants local to this component. */ - -#define PI_PIPE_ID 0x50495045UL - - -/* Define the Pipe Control Block data type. */ - -typedef struct PI_PCB_STRUCT -{ - CS_NODE pi_created; /* Node for linking to */ - /* created pipe list */ - UNSIGNED pi_id; /* Internal PCB ID */ - CHAR pi_name[NU_MAX_NAME]; /* Pipe name */ - DATA_ELEMENT pi_fixed_size; /* Fixed-size messages? */ - DATA_ELEMENT pi_fifo_suspend; /* Suspension type flag */ -#if PAD_2 - DATA_ELEMENT pi_padding[PAD_2]; -#endif - UNSIGNED pi_pipe_size; /* Total size of pipe */ - UNSIGNED pi_messages; /* Messages in pipe */ - UNSIGNED pi_message_size; /* Size of each message */ - UNSIGNED pi_available; /* Available bytes */ - BYTE_PTR pi_start; /* Start of pipe area */ - BYTE_PTR pi_end; /* End of pipe area + 1 */ - BYTE_PTR pi_read; /* Read pointer */ - BYTE_PTR pi_write; /* Write pointer */ - UNSIGNED pi_tasks_waiting; /* Number of waiting tasks*/ - struct PI_SUSPEND_STRUCT - *pi_urgent_list; /* Urgent message suspend */ - struct PI_SUSPEND_STRUCT - *pi_suspension_list; /* Suspension list */ -} PI_PCB; - - -/* Define the Pipe suspension structure. This structure is allocated off of - the caller's stack. */ - -typedef struct PI_SUSPEND_STRUCT -{ - CS_NODE pi_suspend_link; /* Link to suspend blocks */ - PI_PCB *pi_pipe; /* Pointer to the pipe */ - TC_TCB *pi_suspended_task; /* Task suspended */ - BYTE_PTR pi_message_area; /* Pointer to message area*/ - UNSIGNED pi_message_size; /* Message size requested */ - UNSIGNED pi_actual_size; /* Actual size of message */ - STATUS pi_return_status; /* Return status */ -} PI_SUSPEND; - -#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/pm_defs.h --- a/src/gpf/inc/nuc/pm_defs.h Sun Jul 15 20:57:33 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/*************************************************************************/ -/* */ -/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ -/* */ -/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ -/* subject matter of this material. All manufacturing, reproduction, */ -/* use, and sales rights pertaining to this subject matter are governed */ -/* by the license agreement. The recipient of this software implicitly */ -/* accepts the terms of the license. */ -/* */ -/*************************************************************************/ - -/*************************************************************************/ -/* */ -/* FILE NAME VERSION */ -/* */ -/* pm_defs.h PLUS 1.2 */ -/* */ -/* COMPONENT */ -/* */ -/* PM - Partition Memory Management */ -/* */ -/* DESCRIPTION */ -/* */ -/* This file contains data structure definitions and constants for */ -/* the Partition Memory component. */ -/* */ -/* AUTHOR */ -/* */ -/* William E. Lamie, Accelerated Technology, Inc. */ -/* */ -/* DATA STRUCTURES */ -/* */ -/* PM_PCB Partition Pool control block */ -/* PM_HEADER Header of each partition */ -/* PM_SUSPEND Partition suspension block */ -/* */ -/* FUNCTIONS */ -/* */ -/* None */ -/* */ -/* DEPENDENCIES */ -/* */ -/* cs_defs.h Common service definitions */ -/* tc_defs.h Thread Control definitions */ -/* */ -/* HISTORY */ -/* */ -/* NAME DATE REMARKS */ -/* */ -/* W. Lamie 03-01-1993 Created initial version 1.0 */ -/* D. Lamie 04-19-1993 Verified version 1.0 */ -/* W. Lamie 03-01-1994 Moved include files outside of */ -/* the file #ifndef to allow the */ -/* use of actual data structures, */ -/* removed protect structure, */ -/* added padding logic, */ -/* resulting in version 1.1 */ -/* R. Pfaff - */ -/* D. Lamie 03-18-1994 Verified version 1.1 */ -/* M.Q. Qian 04-17-1996 updated to version 1.2 */ -/* */ -/*************************************************************************/ - -#include "cs_defs.h" /* Common service constants */ -#include "tc_defs.h" /* Thread control constants */ - - -/* Check to see if the file has been included already. */ - -#ifndef PM_DEFS -#define PM_DEFS - - -/* Define constants local to this component. */ - -#define PM_PARTITION_ID 0x50415254UL -#define PM_OVERHEAD ((sizeof(PM_HEADER) + sizeof(UNSIGNED) \ - - 1)/sizeof(UNSIGNED)) * \ - sizeof(UNSIGNED) - - -/* Define the Partition Pool Control Block data type. */ - -typedef struct PM_PCB_STRUCT -{ - CS_NODE pm_created; /* Node for linking to */ - /* created partition list */ - UNSIGNED pm_id; /* Internal PCB ID */ - CHAR pm_name[NU_MAX_NAME]; /* Partition Pool name */ - VOID *pm_start_address; /* Starting pool address */ - UNSIGNED pm_pool_size; /* Size of pool */ - UNSIGNED pm_partition_size; /* Size of each partition */ - UNSIGNED pm_available; /* Available partitions */ - UNSIGNED pm_allocated; /* Allocated partitions */ - struct PM_HEADER_STRUCT - *pm_available_list; /* Available list */ - DATA_ELEMENT pm_fifo_suspend; /* Suspension type flag */ -#if PAD_1 - DATA_ELEMENT pm_padding[PAD_1]; -#endif - UNSIGNED pm_tasks_waiting; /* Number of waiting tasks*/ - struct PM_SUSPEND_STRUCT - *pm_suspension_list; /* Suspension list */ -} PM_PCB; - - -/* Define the header structure that is in front of each memory partition. */ - -typedef struct PM_HEADER_STRUCT -{ - struct PM_HEADER_STRUCT - *pm_next_available; /* Next available memory */ - /* partition */ - PM_PCB *pm_partition_pool; /* Partition pool pointer */ -} PM_HEADER; - - -/* Define the partition suspension structure. This structure is allocated - off of the caller's stack. */ - -typedef struct PM_SUSPEND_STRUCT -{ - CS_NODE pm_suspend_link; /* Link to suspend blocks */ - PM_PCB *pm_partition_pool; /* Pointer to pool */ - TC_TCB *pm_suspended_task; /* Task suspended */ - VOID *pm_return_pointer; /* Return memory address */ - STATUS pm_return_status; /* Return status */ -} PM_SUSPEND; - -#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/qu_defs.h --- a/src/gpf/inc/nuc/qu_defs.h Sun Jul 15 20:57:33 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/*************************************************************************/ -/* */ -/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ -/* */ -/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ -/* subject matter of this material. All manufacturing, reproduction, */ -/* use, and sales rights pertaining to this subject matter are governed */ -/* by the license agreement. The recipient of this software implicitly */ -/* accepts the terms of the license. */ -/* */ -/*************************************************************************/ - -/*************************************************************************/ -/* */ -/* FILE NAME VERSION */ -/* */ -/* qu_defs.h PLUS 1.2 */ -/* */ -/* COMPONENT */ -/* */ -/* QU - Queue Management */ -/* */ -/* DESCRIPTION */ -/* */ -/* This file contains data structure definitions and constants for */ -/* the message Queue component. */ -/* */ -/* AUTHOR */ -/* */ -/* William E. Lamie, Accelerated Technology, Inc. */ -/* */ -/* DATA STRUCTURES */ -/* */ -/* QU_QCB Queue control block */ -/* QU_SUSPEND Queue suspension block */ -/* */ -/* FUNCTIONS */ -/* */ -/* None */ -/* */ -/* DEPENDENCIES */ -/* */ -/* cs_defs.h Common service definitions */ -/* tc_defs.h Thread Control definitions */ -/* */ -/* HISTORY */ -/* */ -/* NAME DATE REMARKS */ -/* */ -/* W. Lamie 03-01-1993 Created initial version 1.0 */ -/* D. Lamie 04-19-1993 Verified version 1.0 */ -/* W. Lamie 03-01-1994 Moved include files outside of */ -/* the file #ifndef to allow the */ -/* use of actual data structures, */ -/* removed protection structure, */ -/* put padding into structure, */ -/* resulting in version 1.1 */ -/* R. Pfaff - */ -/* D. Lamie 03-18-1994 Verified version 1.1 */ -/* M.Q. Qian 04-17-1996 updated to version 1.2 */ -/* */ -/*************************************************************************/ - -#include "cs_defs.h" /* Common service constants */ -#include "tc_defs.h" /* Thread control constants */ - - -/* Check to see if the file has been included already. */ - -#ifndef QU_DEFS -#define QU_DEFS - - -/* Define constants local to this component. */ - -#define QU_QUEUE_ID 0x51554555UL - - -/* Define the Queue Control Block data type. */ - -typedef struct QU_QCB_STRUCT -{ - CS_NODE qu_created; /* Node for linking to */ - /* created queue list */ - UNSIGNED qu_id; /* Internal QCB ID */ - CHAR qu_name[NU_MAX_NAME]; /* Queue name */ - DATA_ELEMENT qu_fixed_size; /* Fixed-size messages? */ - DATA_ELEMENT qu_fifo_suspend; /* Suspension type flag */ -#if PAD_2 - DATA_ELEMENT qu_padding[PAD_2]; -#endif - UNSIGNED qu_queue_size; /* Total size of queue */ - UNSIGNED qu_messages; /* Messages in queue */ - UNSIGNED qu_message_size; /* Size of each message */ - UNSIGNED qu_available; /* Available words */ - UNSIGNED_PTR qu_start; /* Start of queue area */ - UNSIGNED_PTR qu_end; /* End of queue area + 1 */ - UNSIGNED_PTR qu_read; /* Read pointer */ - UNSIGNED_PTR qu_write; /* Write pointer */ - UNSIGNED qu_tasks_waiting; /* Number of waiting tasks*/ - struct QU_SUSPEND_STRUCT - *qu_urgent_list; /* Urgent message suspend */ - struct QU_SUSPEND_STRUCT - *qu_suspension_list; /* Suspension list */ -} QU_QCB; - - -/* Define the queue suspension structure. This structure is allocated off of - the caller's stack. */ - -typedef struct QU_SUSPEND_STRUCT -{ - CS_NODE qu_suspend_link; /* Link to suspend blocks */ - QU_QCB *qu_queue; /* Pointer to the queue */ - TC_TCB *qu_suspended_task; /* Task suspended */ - UNSIGNED_PTR qu_message_area; /* Pointer to message area*/ - UNSIGNED qu_message_size; /* Message size requested */ - UNSIGNED qu_actual_size; /* Actual size of message */ - STATUS qu_return_status; /* Return status */ -} QU_SUSPEND; - -#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/sm_defs.h --- a/src/gpf/inc/nuc/sm_defs.h Sun Jul 15 20:57:33 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -/*************************************************************************/ -/* */ -/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ -/* */ -/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ -/* subject matter of this material. All manufacturing, reproduction, */ -/* use, and sales rights pertaining to this subject matter are governed */ -/* by the license agreement. The recipient of this software implicitly */ -/* accepts the terms of the license. */ -/* */ -/*************************************************************************/ - -/*************************************************************************/ -/* */ -/* FILE NAME VERSION */ -/* */ -/* sm_defs.h PLUS 1.2 */ -/* */ -/* COMPONENT */ -/* */ -/* SM - Semaphore Management */ -/* */ -/* DESCRIPTION */ -/* */ -/* This file contains data structure definitions and constants for */ -/* the Semaphore component. */ -/* */ -/* AUTHOR */ -/* */ -/* William E. Lamie, Accelerated Technology, Inc. */ -/* */ -/* DATA STRUCTURES */ -/* */ -/* SM_SCB Semaphore control block */ -/* SM_SUSPEND Semaphore suspension block */ -/* */ -/* FUNCTIONS */ -/* */ -/* None */ -/* */ -/* DEPENDENCIES */ -/* */ -/* cs_defs.h Common service definitions */ -/* tc_defs.h Thread Control definitions */ -/* */ -/* HISTORY */ -/* */ -/* NAME DATE REMARKS */ -/* */ -/* W. Lamie 03-01-1993 Created initial version 1.0 */ -/* D. Lamie 04-19-1993 Verified version 1.0 */ -/* W. Lamie 03-01-1994 Moved include files outside of */ -/* the file #ifndef to allow the */ -/* use of actual data structures, */ -/* removed protection structure, */ -/* put padding into structure, */ -/* resulting in version 1.1 */ -/* R. Pfaff - */ -/* D. Lamie 03-18-1994 Verified version 1.1 */ -/* M.Q. Qian 04-17-1996 updated to version 1.2 */ -/* */ -/*************************************************************************/ - -#include "cs_defs.h" /* Common service constants */ -#include "tc_defs.h" /* Thread control constants */ - - -/* Check to see if the file has been included already. */ - -#ifndef SM_DEFS -#define SM_DEFS - - -/* Define constants local to this component. */ - -#define SM_SEMAPHORE_ID 0x53454d41UL - - -/* Define the Semaphore Control Block data type. */ - -typedef struct SM_SCB_STRUCT -{ - CS_NODE sm_created; /* Node for linking to */ - /* created semaphore list */ - UNSIGNED sm_id; /* Internal SCB ID */ - CHAR sm_name[NU_MAX_NAME]; /* Semaphore name */ - UNSIGNED sm_semaphore_count; /* Counting semaphore */ - DATA_ELEMENT sm_fifo_suspend; /* Suspension type flag */ -#if PAD_1 - DATA_ELEMENT sm_padding[PAD_1]; -#endif - UNSIGNED sm_tasks_waiting; /* Number of waiting tasks*/ - struct SM_SUSPEND_STRUCT - *sm_suspension_list; /* Suspension list */ -} SM_SCB; - - -/* Define the semaphore suspension structure. This structure is allocated - off of the caller's stack. */ - -typedef struct SM_SUSPEND_STRUCT -{ - CS_NODE sm_suspend_link; /* Link to suspend blocks */ - SM_SCB *sm_semaphore; /* Pointer to semaphore */ - TC_TCB *sm_suspended_task; /* Task suspended */ - STATUS sm_return_status; /* Return status */ -} SM_SUSPEND; - -#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/tc_defs.h --- a/src/gpf/inc/nuc/tc_defs.h Sun Jul 15 20:57:33 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,234 +0,0 @@ -/*************************************************************************/ -/* */ -/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ -/* */ -/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ -/* subject matter of this material. All manufacturing, reproduction, */ -/* use, and sales rights pertaining to this subject matter are governed */ -/* by the license agreement. The recipient of this software implicitly */ -/* accepts the terms of the license. */ -/* */ -/*************************************************************************/ - -/*************************************************************************/ -/* */ -/* FILE NAME VERSION */ -/* */ -/* tc_defs.h PLUS/MNT */ -/* VERSION 1.1 */ -/* COMPONENT */ -/* */ -/* TC - Thread Control */ -/* */ -/* DESCRIPTION */ -/* */ -/* This file contains data structure definitions and constants for */ -/* the component that controls the various threads of execution in */ -/* system. Threads include tasks, HISRs, signal handlers, etc. */ -/* */ -/* AUTHOR */ -/* */ -/* William E. Lamie, Accelerated Technology, Inc. */ -/* */ -/* DATA STRUCTURES */ -/* */ -/* TC_TCB Task Control Block */ -/* TC_HCB HISR Control Block */ -/* TC_PROTECT Task/HISR protection struct */ -/* */ -/* FUNCTIONS */ -/* */ -/* None */ -/* */ -/* DEPENDENCIES */ -/* */ -/* cs_defs.h Common service definitions */ -/* tm_defs.h Timer control definitions */ -/* */ -/* HISTORY */ -/* */ -/* NAME DATE REMARKS */ -/* */ -/* W. Lamie 03-01-1993 Created initial version 1.0 */ -/* D. Lamie 04-19-1993 Verified version 1.0 */ -/* W. Lamie 06-01-1993 Added padding conditional into */ -/* TC_TCB structure, making */ -/* version 1.0a */ -/* D. Lamie 06-01-1993 Verified version 1.0a */ -/* W. Lamie 03-01-1994 Moved include files outside of */ -/* the file #ifndef to allow the */ -/* use of actual data structures, */ -/* added four reserved words in */ -/* both the task and HISR blocks, */ -/* resulting in version 1.1 */ -/* R. Pfaff - */ -/* D. Lamie 03-18-1994 Verified version 1.1 */ -/* M.Q. Qian 04-17-1996 updated to version 1.2 */ -/* B. Haggerty 03-12-1997 Released MNT Version 1.0 */ -/* B. Haggerty 08-11-1997 Released MNT Version 1.1 */ -/* */ -/*************************************************************************/ - -#include "cs_defs.h" /* Common service constants */ -#include "tm_defs.h" /* Timer control structures */ - - -/* Check to see if the file has been included already. */ - -#ifndef TC_DEFS -#define TC_DEFS - - -/* Define constants local to this component. */ - -#define TC_TASK_ID 0x5441534bUL -#define TC_HISR_ID 0x48495352UL -#define TC_PRIORITIES 256 -#define TC_HISR_PRIORITIES 3 -#define TC_MAX_GROUPS TC_PRIORITIES/8 -#define TC_HIGHEST_MASK 0x000000FFUL -#define TC_NEXT_HIGHEST_MASK 0x0000FF00UL -#define TC_NEXT_LOWEST_MASK 0x00FF0000UL -#define TC_LOWEST_MASK 0xFF000000UL - -/* Define the Task Control Block data type. */ - -typedef struct TC_TCB_STRUCT -{ - /* Standard thread information first. This information is used by - the target dependent portion of this component. Changes made - to this area of the structure can have undesirable side effects. */ - - CS_NODE tc_created; /* Node for linking to */ - /* created task list */ - UNSIGNED tc_id; /* Internal TCB ID */ - CHAR tc_name[NU_MAX_NAME]; /* Task name */ - DATA_ELEMENT tc_status; /* Task status */ - DATA_ELEMENT tc_delayed_suspend; /* Delayed task suspension*/ - DATA_ELEMENT tc_priority; /* Task priority */ - DATA_ELEMENT tc_preemption; /* Task preemption enable */ - UNSIGNED tc_scheduled; /* Task scheduled count */ - UNSIGNED tc_cur_time_slice; /* Current time slice */ - VOID *tc_stack_start; /* Stack starting address */ - VOID *tc_stack_end; /* Stack ending address */ - VOID *tc_stack_pointer; /* Task stack pointer */ - UNSIGNED tc_stack_size; /* Task stack's size */ - UNSIGNED tc_stack_minimum; /* Minimum stack size */ - struct TC_PROTECT_STRUCT - *tc_current_protect; /* Current protection */ - VOID *tc_saved_stack_ptr; /* Previous stack pointer */ - UNSIGNED tc_time_slice; /* Task time slice value */ - - - /* Information after this point is not used in the target dependent - portion of this component. Hence, changes in the following section - should not impact assembly language routines. */ - struct TC_TCB_STRUCT - *tc_ready_previous, /* Previously ready TCB */ - *tc_ready_next; /* next and previous ptrs */ - - /* Task control information follows. */ - - UNSIGNED tc_priority_group; /* Priority group mask bit*/ - struct TC_TCB_STRUCT - **tc_priority_head; /* Pointer to list head */ - DATA_ELEMENT *tc_sub_priority_ptr; /* Pointer to sub-group */ - DATA_ELEMENT tc_sub_priority; /* Mask of sub-group bit */ - DATA_ELEMENT tc_saved_status; /* Previous task status */ - DATA_ELEMENT tc_signal_active; /* Signal active flag */ - -#if PAD_3 - DATA_ELEMENT tc_padding[PAD_3]; -#endif - - /* Task entry function */ - VOID (*tc_entry)(UNSIGNED, VOID *); - UNSIGNED tc_argc; /* Optional task argument */ - VOID *tc_argv; /* Optional task argument */ - VOID (*tc_cleanup) (VOID *);/* Clean-up routine */ - VOID *tc_cleanup_info; /* Clean-up information */ - struct TC_PROTECT_STRUCT - *tc_suspend_protect; /* Protection at time of */ - /* task suspension */ - - /* Task timer information. */ - INT tc_timer_active; /* Active timer flag */ - TM_TCB tc_timer_control; /* Timer control block */ - - /* Task signal control information. */ - - UNSIGNED tc_signals; /* Current signals */ - UNSIGNED tc_enabled_signals; /* Enabled signals */ - - /* tc_saved_status and tc_signal_active are now defined above in an - attempt to keep DATA_ELEMENT types together. */ - - /* Signal handling routine. */ - VOID (*tc_signal_handler) (UNSIGNED); - - /* Reserved words for the system and a single reserved word for the - application. */ - UNSIGNED tc_system_reserved_1; /* System reserved word */ - UNSIGNED tc_system_reserved_2; /* System reserved word */ - UNSIGNED tc_system_reserved_3; /* System reserved word */ - UNSIGNED tc_app_reserved_1; /* Application reserved */ - -} TC_TCB; - - -/* Define the High-Level Interrupt Service Routine Control Block data type. */ - -typedef struct TC_HCB_STRUCT -{ - /* Standard thread information first. This information is used by - the target dependent portion of this component. Changes made - to this area of the structure can have undesirable side effects. */ - - CS_NODE tc_created; /* Node for linking to */ - /* created task list */ - UNSIGNED tc_id; /* Internal TCB ID */ - CHAR tc_name[NU_MAX_NAME]; /* HISR name */ - DATA_ELEMENT tc_not_used_1; /* Not used field */ - DATA_ELEMENT tc_not_used_2; /* Not used field */ - DATA_ELEMENT tc_priority; /* HISR priority */ - DATA_ELEMENT tc_not_used_3; /* Not used field */ - UNSIGNED tc_scheduled; /* HISR scheduled count */ - UNSIGNED tc_cur_time_slice; /* Not used in HISR */ - VOID *tc_stack_start; /* Stack starting address */ - VOID *tc_stack_end; /* Stack ending address */ - VOID *tc_stack_pointer; /* HISR stack pointer */ - UNSIGNED tc_stack_size; /* HISR stack's size */ - UNSIGNED tc_stack_minimum; /* Minimum stack size */ - struct TC_PROTECT_STRUCT - *tc_current_protect; /* Current protection */ - struct TC_HCB_STRUCT - *tc_active_next; /* Next activated HISR */ - - /* Information after this point is not used in the target dependent - portion of this component. Hence, changes in the following section - should not impact assembly language routines. */ - UNSIGNED tc_activation_count; /* Activation counter */ - VOID (*tc_entry)(VOID); /* HISR entry function */ -/*#ifdef SUN */ - VOID (*tc_actual_entry)(); /* HISR entry function MNT 1.2 */ -/*#endif */ - - /* Reserved words for the system and a single reserved word for the - application. */ - UNSIGNED tc_system_reserved_1; /* System reserved word */ - UNSIGNED tc_system_reserved_2; /* System reserved word */ - UNSIGNED tc_system_reserved_3; /* System reserved word */ - UNSIGNED tc_app_reserved_1; /* Application reserved */ - -} TC_HCB; - - -/* Define the Task/HISR protection structure type. */ - -typedef struct TC_PROTECT_STRUCT -{ - TC_TCB *tc_tcb_pointer; /* Owner of the protection */ - UNSIGNED tc_thread_waiting; /* Waiting thread flag */ -} TC_PROTECT; - -#endif diff -r 0f80e1e4dce4 -r ed162c9cd29f src/gpf/inc/nuc/tm_defs.h --- a/src/gpf/inc/nuc/tm_defs.h Sun Jul 15 20:57:33 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/*************************************************************************/ -/* */ -/* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ -/* */ -/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ -/* subject matter of this material. All manufacturing, reproduction, */ -/* use, and sales rights pertaining to this subject matter are governed */ -/* by the license agreement. The recipient of this software implicitly */ -/* accepts the terms of the license. */ -/* */ -/*************************************************************************/ - -/*************************************************************************/ -/* */ -/* FILE NAME VERSION */ -/* */ -/* tm_defs.h PLUS 1.2 */ -/* */ -/* COMPONENT */ -/* */ -/* TM - Timer Management */ -/* */ -/* DESCRIPTION */ -/* */ -/* This file contains data structure definitions and constants for */ -/* the Timer Management component. */ -/* */ -/* AUTHOR */ -/* */ -/* William E. Lamie, Accelerated Technology, Inc. */ -/* */ -/* DATA STRUCTURES */ -/* */ -/* TM_TCB Timer control block */ -/* TM_APP_TCB Application timer control */ -/* block */ -/* */ -/* FUNCTIONS */ -/* */ -/* None */ -/* */ -/* DEPENDENCIES */ -/* */ -/* cs_defs.h Common service definitions */ -/* tc_defs.h Thread control definitions */ -/* */ -/* HISTORY */ -/* */ -/* NAME DATE REMARKS */ -/* */ -/* W. Lamie 03-01-1993 Created initial version 1.0 */ -/* D. Lamie 04-19-1993 Verified version 1.0 */ -/* W. Lamie 03-01-1994 Moved include files outside of */ -/* the file #ifndef to allow the */ -/* use of actual data structures, */ -/* resulting in version 1.1 */ -/* R. Pfaff - */ -/* D. Lamie 03-18-1994 Verified version 1.1 */ -/* M.Q. Qian 04-17-1996 updated to version 1.2 */ -/* */ -/*************************************************************************/ - -#include "cs_defs.h" /* Common service constants */ - - -/* Check to see if the file has been included already. */ - -#ifndef TM_DEFS -#define TM_DEFS - - -/* Define constants local to this component. */ - -#define TM_TIMER_ID 0x54494d45UL -#define TM_ACTIVE 0 -#define TM_NOT_ACTIVE 1 -#define TM_EXPIRED 2 -#define TM_TASK_TIMER 0 -#define TM_APPL_TIMER 1 - -/* Define the Timer Control Block data type. */ - -typedef struct TM_TCB_STRUCT -{ - INT tm_timer_type; /* Application/Task */ - UNSIGNED tm_remaining_time; /* Remaining time */ - VOID *tm_information; /* Information pointer */ - struct TM_TCB_STRUCT - *tm_next_timer, /* Next timer in list */ - *tm_previous_timer; /* Previous timer in list*/ -} TM_TCB; - - -/* Define Application's Timer Control Block data type. */ - -typedef struct TM_APP_TCB_STRUCT -{ - CS_NODE tm_created; /* Node for linking to */ - /* created timer list */ - UNSIGNED tm_id; /* Internal TCB ID */ - CHAR tm_name[NU_MAX_NAME]; /* Timer name */ - VOID (*tm_expiration_routine)(UNSIGNED); /* Expiration function */ - UNSIGNED tm_expiration_id; /* Expiration ID */ - INT tm_enabled; /* Timer enabled flag */ - UNSIGNED tm_expirations; /* Number of expirations */ - UNSIGNED tm_initial_time; /* Initial time */ - UNSIGNED tm_reschedule_time; /* Reschedule time */ - TM_TCB tm_actual_timer; /* Actual timer internals*/ -} TM_APP_TCB; - - -/* Include this file here, since it contains references to the timer definition - structure that is defined by this file. */ - -#include "tc_defs.h" - -#endif