83 | | |
84 | | === 4) int '''_sys_tty_get_lock'''( unsigned int channel, unsigned int* save_sr_ptr ) === |
85 | | This blocking function try to take the lock protecting exclusive access to TTY terminal identified by the "channel" argument. It enters a critical section before taking the lock, and save the SR value at address defined by the ''save_sr_ptr'' argument. Returns -1 if no TTY terminal allocated to the calling task. If a TTY terminal is allocated, it returns only when the lock has been successfully taken. |
86 | | |
87 | | === 5) int '''_sys_tty_release_lock'''( unsigned int channel, unsigned int* save_sr_ptr ) === |
88 | | This function releases the lock protecting exclusive access to TTY terminal identified by the ''channel'' argument. |
89 | | It exit the critical section after lock release, and restore SR value from address defined by the ''save_sr_ptr'' argument. Returns -1 if no TTY terminal allocated to the calling task. |