Motorola MCP750 Specifications Page 295

  • Download
  • Add to my manuals
  • Print
  • Page
    / 344
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 294
Writing a User-Level Device Drive
r
17-19
is suggested that the string indicate the name of the routine that has produced
the error.
The uderror routine writes the following to the standard error: the specified string,
followed by a colon, a space, a brief error message corresponding to the specified error
code, and a newline. Examples of the call and resulting output are as follows:
uderror(EUD_MEMLOCK,”lock_driver_pages”);
"lock_driver_pages: unable to lock driver text pages"
An array of pointers to the error messages associated with the user-level device driver
error codes, ud_errmsg, is defined and initialized in the file <userdriv.h>. You can
index the ud_errmsg array by using a user-level device driver error code. The variable
udmaxerr contains the highest message number that can be used to index the array.
For reference information on the uderror(3X) routine, refer to the corresponding sys-
tem manual page.
The spl Support Routines 17
A set of C library routines enables you to raise and lower a processor’s interrupt priority
level from user level. You can modify the IPL by binding the physical address of the IPL
register to a process’s virtual address space and then writing directly to the hardware regis-
ter. The routines and macro are briefly described as follows:
spl_map map the physical address of the IPL register
or processor level register to a process’s vir-
tual address space
spl_request set the processor IPL to a specified level
spl_request_macro set the processor IPL to a specified level
spl_unmap unmap the IPL register or processor level
register with an spl_map call
The spl support routines are used to synchronize processes’ access to device registers,
synchronize processes’ access to shared data that can be modified at program and interrupt
level, and prevent rescheduling while a spin lock is locked.
Procedures for using the routines and the related macro are fully explained in the Pow-
erUX Real-Time Guide; reference information is provided in the corresponding system
manual pages.
Process Synchronization Tools 17
A set of real-time process synchronization tools has been developed to provide solutions
to the problems associated with synchronizing cooperating processes’ access to data in
shared memory. They include tools for controlling a process’s vulnerability to
rescheduling, serializing processes’ access to critical sections with busy-wait mutual
Page view 294
1 2 ... 290 291 292 293 294 295 296 297 298 299 300 ... 343 344

Comments to this Manuals

No comments