summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include/rtems/io.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
commit3a4ae6c210bcc37754767966f1128ae23c77b6af (patch)
tree8804983e5b92bec788d548df13db7513118d351d /cpukit/sapi/include/rtems/io.h
parentnew file -- split from inlines (diff)
downloadrtems-3a4ae6c210bcc37754767966f1128ae23c77b6af.tar.bz2
The word "RTEMS" almost completely removed from the core.
Configuration Table Template file added and all tests modified to use this. All gvar.h and conftbl.h files removed from test directories. Configuration parameter maximum_devices added. Core semaphore and mutex handlers added and RTEMS API Semaphore Manager updated to reflect this. Initialization sequence changed to invoke API specific initialization routines. Initialization tasks table now owned by RTEMS Tasks Manager. Added user extension for post-switch. Utilized user extensions to implement API specific functionality like signal dispatching. Added extensions to the System Initialization Thread so that an API can register a function to be invoked while the system is being initialized. These are largely equivalent to the pre-driver and post-driver hooks. Added the Modules file oar-go32_p5, modified oar-go32, and modified the file make/custom/go32.cfg to look at an environment varable which determines what CPU model is being used. All BSPs updated to reflect named devices and clock driver's IOCTL used by the Shared Memory Driver. Also merged clock isr into main file and removed ckisr.c where possible. Updated spsize to reflect new and moved variables. Makefiles for the executive source and include files updated to show break down of files into Core, RTEMS API, and Neither. Header and inline files installed into subdirectory based on whether logically in the Core or a part of the RTEMS API.
Diffstat (limited to '')
-rw-r--r--cpukit/sapi/include/rtems/io.h56
1 files changed, 44 insertions, 12 deletions
diff --git a/cpukit/sapi/include/rtems/io.h b/cpukit/sapi/include/rtems/io.h
index ef9fc69d03..6f3afba53e 100644
--- a/cpukit/sapi/include/rtems/io.h
+++ b/cpukit/sapi/include/rtems/io.h
@@ -32,16 +32,40 @@
extern "C" {
#endif
-#include <rtems/config.h>
+#include <rtems/rtems/status.h>
/*
- * The following declare the data required to manage the Device Driver
- * Address Table.
+ *
+ * The following defines the types for:
+ *
+ * + major and minor numbers
+ * + the return type of a device driver entry
+ * + a pointer to a device driver entry
+ * + an entry in the the Device Driver Address Table. Each entry in this
+ * table corresponds to an application provided device driver and
+ * defines the entry points for that device driver.
*/
+
+typedef unsigned32 rtems_device_major_number;
+typedef unsigned32 rtems_device_minor_number;
+
+typedef rtems_status_code rtems_device_driver;
+
+typedef rtems_device_driver ( *rtems_device_driver_entry )(
+ rtems_device_major_number,
+ rtems_device_minor_number,
+ void *
+ );
-EXTERN unsigned32 _IO_Number_of_drivers;
-EXTERN rtems_driver_address_table *_IO_Driver_address_table;
-
+typedef struct {
+ rtems_device_driver_entry initialization; /* initialization procedure */
+ rtems_device_driver_entry open; /* open request procedure */
+ rtems_device_driver_entry close; /* close request procedure */
+ rtems_device_driver_entry read; /* read request procedure */
+ rtems_device_driver_entry write; /* write request procedure */
+ rtems_device_driver_entry control; /* special functions procedure */
+} rtems_driver_address_table;
+
/*
* Table for the io device names
*/
@@ -53,12 +77,19 @@ typedef struct {
rtems_device_minor_number minor;
} rtems_driver_name_t;
-/*XXX this really should be allocated some better way... */
-/*XXX it should probably be a chain and use a 'maximum' drivers field
- * in config table */
-#define RTEMS_MAX_DRIVER_NAMES 20
-EXTERN rtems_driver_name_t rtems_driver_name_table[RTEMS_MAX_DRIVER_NAMES];
+/*
+ * This is the table of device names.
+ */
+
+/*
+ * The following declare the data required to manage the Driver
+ * Address Table and Device Name Table.
+ */
+EXTERN unsigned32 _IO_Number_of_drivers;
+EXTERN rtems_driver_address_table *_IO_Driver_address_table;
+EXTERN unsigned32 _IO_Number_of_devices;
+EXTERN rtems_driver_name_t *_IO_Driver_name_table;
/*
* _IO_Manager_initialization
@@ -70,7 +101,8 @@ EXTERN rtems_driver_name_t rtems_driver_name_table[RTEMS_MAX_DRIVER_NAMES];
STATIC INLINE void _IO_Manager_initialization(
rtems_driver_address_table *driver_table,
- unsigned32 number_of_drivers
+ unsigned32 number_of_drivers,
+ unsigned32 number_of_devices
);
/*