Changeset 565 for trunk/kernel/devices/dev_txt.c
- Timestamp:
- Oct 4, 2018, 11:48:51 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_txt.c
r540 r565 2 2 * dev_txt.c - TXT (Text Terminal) generic device API implementation. 3 3 * 4 * Author Alain Greiner (2016 )4 * Author Alain Greiner (2016,2017,2018) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 27 27 #include <hal_drivers.h> 28 28 #include <thread.h> 29 #include <remote_busylock.h> 29 30 #include <chdev.h> 30 31 #include <rpc.h> … … 38 39 extern chdev_directory_t chdev_dir; // allocated in kernel_init.c 39 40 41 40 42 #if (DEBUG_SYS_READ & 1) 41 43 extern uint32_t enter_txt_read; … … 48 50 #endif 49 51 50 //////////////////////////////////////// 52 /////////////////////////////////////////////////// 51 53 const char * dev_txt_type_str( dev_txt_cmd_t type ) 52 54 { … … 81 83 txt->ext.txt.owner_xp = XPTR_NULL; 82 84 xlist_root_init( XPTR( local_cxy, &txt->ext.txt.root ) ); 83 remote_ spinlock_init( XPTR( local_cxy , &txt->ext.txt.lock ));85 remote_busylock_init( XPTR( local_cxy , &txt->ext.txt.lock ), LOCK_CHDEV_TXTLIST ); 84 86 85 87 // call driver init function … … 257 259 } 258 260 259 ////////////////////////////////////////////// 260 error_t dev_txt_sync_write( c har* buffer,261 uint32_t count )261 //////////////////////////////////////////////// 262 error_t dev_txt_sync_write( const char * buffer, 263 uint32_t count ) 262 264 { 263 265 // get extended pointer on TXT[0] chdev … … 269 271 // get TXTO chdev cluster and local pointer 270 272 cxy_t dev_cxy = GET_CXY( dev_xp ); 271 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp );273 chdev_t * dev_ptr = GET_PTR( dev_xp ); 272 274 273 275 // get driver command function
Note: See TracChangeset
for help on using the changeset viewer.