⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gfdfilesys.c

📁 基于东南大学开发的SEP3203的ARM7中的所有驱动
💻 C
📖 第 1 页 / 共 5 页
字号:
#include "plus/nucleus.h"
#include "filesys.h"
#include "plus/pm_defs.h"
#include "plus/DM_defs.h"
#include "plus/Sm_defs.h"
#include "internal.h"
#include "plus/ev_defs.h"
#include <stdio.h>

STATUS  EVC_Create_Event_Group(NU_EVENT_GROUP *event_group_ptr, CHAR *name);
STATUS  DMC_Allocate_Memory(NU_MEMORY_POOL *pool_ptr, VOID **return_pointer, 
                                        UNSIGNED size, UNSIGNED suspend);
/***********************************************************************************************/
//          GLOBAL PARAMETER
/***********************************************************************************************/
const CHAR  RLD_Release_String[] =
  "Copyright (c) 1993-2000 ATI - Nucleus PLUS - Version ARM 7/9  1.11.19";
const CHAR  LID_License_String[] = 
  "Accelerated Technology Internal Use Only - Serial Number: NP0000";
INT     ERD_Error_Code;

/* HID_History_Enable is a flag that indicates whether or not history saving
   is enabled.  If this value is NU_FALSE, history saving is disabled.  
   Otherwise, history saving is enabled.  */
   
INT     HID_History_Enable;


/* HID_Write_Index is the index of the next available entry in the history 
   table.  */
   
INT     HID_Write_Index;


/* HID_Read_Index is the index of the oldest entry in the history table.  */

INT     HID_Read_Index;


/* HID_Entry_Count keeps track of the number of entries currently
   in the history table.  */
   
INT     HID_Entry_Count;


/* HID_History_Protect is a protection structure used to block any other
   thread from access to the history data structures.  */
   
TC_PROTECT      HID_History_Protect;
/* TCD_Created_Tasks_List is the head pointer of the linked list of 
   created tasks.  If the list is NU_NULL, there are no tasks created.  */
   
CS_NODE        *TCD_Created_Tasks_List;


/* TCD_Total_Tasks contains the number of currently created tasks.  */

UNSIGNED        TCD_Total_Tasks;


/* TCD_Priority_List is an array of TCB pointers.  Each element of the array 
   is effectively the head pointer of the list of tasks ready for execution
   at that priority.  If the pointer is NULL, there are no tasks ready
   for execution at that priority.  The array is indexed by priority.  */

TC_TCB         *TCD_Priority_List[TC_PRIORITIES];


/* TCD_Priority_Groups is a 32-bit unsigned integer that is used as a bit 
   map.  Each bit corresponds to an 8-priority group.  For example, if bit 0 
   is set, at least one task of priority 0 through 8 is ready for execution. */

UNSIGNED        TCD_Priority_Groups;


/* TCD_Sub_Priority_Groups is an array of sub-priority groups.  These are 
   also used as bit maps.  Index 0 of this array corresponds to priorities 
   0 through 8.  Bit 0 of this element represents priority 0, while bit 7 
   represents priority 7.  */
   
DATA_ELEMENT    TCD_Sub_Priority_Groups[TC_MAX_GROUPS];

/* TCD_Highest_Priority contains the highest priority task ready for execution.
   Note that this does not necessarily represent the priority of the currently 
   executing task.  This is true if the currently executing task has preemption
   disabled.  If no tasks are executing, this variable is set to the maximum
   priority.  */

INT             TCD_Highest_Priority;


/* TCD_Execute_Task is a pointer to the task to execute.  Note that this 
   pointer does not necessarily point to the currently executing task.  There
   are several points in the system where this is true.  One situation is 
   when preemption is about to take place.  Another situation can result from
   a internal protection conflict.  */
   
TC_TCB         *TCD_Execute_Task;


/* TCD_Created_HISRs_List is the head pointer of the list of created High-
   Level Interrupt Service Routines (HISR).  If this pointer is NU_NULL, there
   are no HISRs currently created.  */
   
CS_NODE        *TCD_Created_HISRs_List;


/* TCD_Total_HISRs contains the number of currently created HISRs.  */

UNSIGNED        TCD_Total_HISRs;


/* TCD_Active_HISR_Heads is an array of active HISR list head pointers.  
   There are three HISR priorities available.  The HISR priority is an index 
   into this table.  Priority/index 0 represents the highest priority.  */
   
TC_HCB         *TCD_Active_HISR_Heads[TC_HISR_PRIORITIES];


/* TCD_Active_HISR_Tails is an array of active HISR list tail pointers.  
   There are three HISR priorities available.  The HISR priority is an index 
   into this table.  Priority/index 0 represents the highest priority.  */
   
TC_HCB          *TCD_Active_HISR_Tails[TC_HISR_PRIORITIES];


/* TCD_Execute_HISR contains a pointer to the highest priority HISR to execute.
   If this pointer is NU_NULL, no HISRs are currently activated.  Note that
   the current thread pointer is not always equal to this pointer.  */
   
TC_HCB         *TCD_Execute_HISR;


/* TCD_Current_Thread points to the control block of the currently executing
   thread of execution.  Therefore, this variable points at either a TC_TCB
   or a TC_HCB structure.  Except for initialization, this variable is set
   and cleared in the target dependent portion of this component.  */
   
VOID           *TCD_Current_Thread;


/* TCD_System_Stack contains the system stack base pointer.  When the system
   is idle or in interrupt processing the system stack pointer is used.  This
   variable is usually setup during target dependent initialization.  */
   
VOID           *TCD_System_Stack;


/* TCD_Registered_LISRs is a list that specifies whether or not a
   LISR is registered for a given interrupt vector.  If the value in the
   list indexed by the vector is non-zero, then that value can be used
   as the index into the list of LISR pointers to find the actual registered
   LISR.  */
   
UNSIGNED_CHAR   TCD_Registered_LISRs[NU_MAX_VECTORS];


/* TCD_LISR_Pointers is a list of LISR pointers that indicate the LISR function
   to call when the interrupt occurs.  If the entry is NULL, it is 
   available.  */

VOID    (*TCD_LISR_Pointers[NU_MAX_LISRS])(INT vector);


/* TCD_Interrupt_Count contains the number of Interrupt Service Routines (ISRs)
   currently in progress.  If the contents of this variable is zero, then no
   interrupts are in progress.  If the contents are greater than 1, nested 
   interrupts are being processed.  */
   
INT     TCD_Interrupt_Count;


/* TCD_Stack_Switched contains a flag indicating that the system stack was
   switched to after the thread's context was saved.  This variable is not
   used in all ports.  */
   
INT     TCD_Stack_Switched;


/* TCD_List_Protect is a structure that is used to protect against multiple
   access to the list of established tasks.  */
   
TC_PROTECT      TCD_List_Protect;


/* TCD_System_Protect is a structure that is used to provide protection
   against multiple threads accessing the same system structures at the
   same time.  */
   
TC_PROTECT      TCD_System_Protect;


/* TCD_LISR_Protect is a structure that is used to provide protection against
   multiple threads accessing the LISR registration structures at the same
   time.  */
   
TC_PROTECT      TCD_LISR_Protect;


/* TCD_HISR_Protect is a structure that is used to provide protection against
   multiple threads accessing the created HISR linked-list at the same time. */
   
TC_PROTECT      TCD_HISR_Protect;


/* TCD_Interrupt_Level is a variable that contains the enabled interrupt 
   level.  If the target processor does not have multiple enable interrupt
   levels, this variable is a boolean.  */
   
INT             TCD_Interrupt_Level;


/* TCD_Unhandled_Interrupt is a variable that contains the last unhandled
   interrupt in system error conditions.  */
   
INT             TCD_Unhandled_Interrupt;

/* MBD_Created_Mailboxes_List is the head pointer of the linked list of 
   created mailboxes.  If the list is NU_NULL, there are no mailboxes
   created.  */
   
CS_NODE        *MBD_Created_Mailboxes_List;


/* MBD_Total_Mailboxes contains the number of currently created 
   mailboxes.  */

UNSIGNED        MBD_Total_Mailboxes;


/* MBD_List_Protect is a list protection structure used to block any other
   thread from access to the created mailbox list.  */
   
TC_PROTECT      MBD_List_Protect;

/* QUD_Created_Queues_List is the head pointer of the linked list of 
   created queues.  If the list is NU_NULL, there are no queues
   created.  */
   
CS_NODE        *QUD_Created_Queues_List;


/* QUD_Total_Queues contains the number of currently created 
   queues.  */

UNSIGNED        QUD_Total_Queues;


/* QUD_List_Protect is a list protection structure used to block any other
   thread from access to the created queue list.  */
   
TC_PROTECT      QUD_List_Protect;

/* PID_Created_Pipes_List is the head pointer of the linked list of 
   created pipes.  If the list is NU_NULL, there are no pipes
   created.  */
   
CS_NODE        *PID_Created_Pipes_List;


/* PID_Total_Pipes contains the number of currently created 
   pipes.  */

UNSIGNED        PID_Total_Pipes;


/* PID_List_Protect is a list protection structure used to block any other
   thread from access to the created pipe list.  */
   
TC_PROTECT      PID_List_Protect;

/* SMD_Created_Semaphores_List is the head pointer of the linked list of 
   created semaphores.  If the list is NU_NULL, there are no semaphores
   created.  */
   
CS_NODE        *SMD_Created_Semaphores_List;


/* SMD_Total_Semaphores contains the number of currently created 
   semaphores.  */

UNSIGNED        SMD_Total_Semaphores;


/* SMD_List_Protect is a list protection structure used to block any other
   thread from access to the created semaphore list.  */
   
TC_PROTECT      SMD_List_Protect;

/* EVD_Created_Event_Groups_List is the head pointer of the linked list of 
   created event groups.  If the list is NU_NULL, there are no event groups
   created.  */
   
CS_NODE        *EVD_Created_Event_Groups_List;


/* EVD_Total_Event_Groups contains the number of currently created 
   event groups.  */

UNSIGNED        EVD_Total_Event_Groups;


/* EVD_List_Protect is a list protection structure used to block any other
   thread from access to the created event group list.  */
   
TC_PROTECT      EVD_List_Protect;

/* PMD_Created_Pools_List is the head pointer of the linked list of 
   created partition pools.  If the list is NU_NULL, there are no partition
   pools created.  */
   
CS_NODE        *PMD_Created_Pools_List;


/* PMD_Total_Pools contains the number of currently created 
   partition pools.  */

UNSIGNED        PMD_Total_Pools;


/* PMD_List_Protect is a list protection structure used to block any other
   thread from access to the created partition pool list.  */
   
TC_PROTECT      PMD_List_Protect;

/* DMD_Created_Pools_List is the head pointer of the linked list of 
   created dynamic memory pools.  If the list is NU_NULL, there are no 
   dynamic memory pools created.  */
   
CS_NODE        *DMD_Created_Pools_List;


/* DMD_Total_Pools contains the number of currently created 
   dynamic memory pools.  */

UNSIGNED        DMD_Total_Pools;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -