Changeset 408 for trunk/kernel/devices
- Timestamp:
- Dec 5, 2017, 4:20:07 PM (7 years ago)
- Location:
- trunk/kernel/devices
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_dma.c
r407 r408 47 47 48 48 // set dma name 49 snprintf( dma->name , 16 , "dma _%d_%x" , channel , local_cxy );49 snprintf( dma->name , 16 , "dma%d_%x" , channel , local_cxy ); 50 50 51 51 // call driver init function … … 72 72 } 73 73 74 // initialises server field in DMAchdev descriptor74 // initialises server field in chdev descriptor 75 75 dma->server = new_thread; 76 77 // initializes chdev field in thread descriptor 78 new_thread->chdev = dma; 76 79 77 // start server thread 78 thread_block( new_thread , THREAD_BLOCKED_DEV_QUEUE ); 80 // unblock server thread 79 81 thread_unblock( XPTR( local_cxy , new_thread ) , THREAD_BLOCKED_GLOBAL ); 80 82 -
trunk/kernel/devices/dev_fbf.c
r407 r408 40 40 { 41 41 // set FBF chdev extension fields 42 // TODO this should be done in the imp ementation42 // TODO this should be done in the implementation 43 43 // TODO specific part, as these parameters must be obtained from the hardware. 44 44 chdev->ext.fbf.width = CONFIG_FBF_WIDTH; -
trunk/kernel/devices/dev_ioc.c
r407 r408 77 77 assert( (error == 0) , __FUNCTION__ , "cannot create server thread" ); 78 78 79 // set "server" field in iocdescriptor79 // set "server" field in chdev descriptor 80 80 ioc->server = new_thread; 81 81 82 // start server thread 83 thread_block( new_thread , THREAD_BLOCKED_DEV_QUEUE ); 82 // set "chdev field in thread descriptor 83 new_thread->chdev = ioc; 84 85 // unblock server thread 84 86 thread_unblock( XPTR( local_cxy , new_thread ) , THREAD_BLOCKED_GLOBAL ); 85 87 -
trunk/kernel/devices/dev_nic.c
r407 r408 79 79 nic->server = new_thread; 80 80 81 // start server thread 82 thread_block( new_thread , THREAD_BLOCKED_DEV_QUEUE ); 81 // set "chdev" field in thread descriptor 82 new_thread->chdev = nic; 83 84 // unblock server thread 83 85 thread_unblock( XPTR( local_cxy , new_thread ) , THREAD_BLOCKED_GLOBAL ); 84 86 … … 101 103 102 104 // get pointer on NIC-RX chdev descriptor 103 uint32_t channel = thread_ptr-> dev_channel;105 uint32_t channel = thread_ptr->chdev->channel; 104 106 xptr_t dev_xp = chdev_dir.nic_rx[channel]; 105 107 cxy_t dev_cxy = GET_CXY( dev_xp ); … … 129 131 // block on THREAD_BLOCKED_IO condition and deschedule 130 132 thread_block( thread_ptr , THREAD_BLOCKED_IO ); 131 sched_yield( );133 sched_yield("client blocked on I/O"); 132 134 133 135 // disable NIC-RX IRQ … … 171 173 172 174 // get pointer on NIC-TX chdev descriptor 173 uint32_t channel = thread_ptr-> dev_channel;175 uint32_t channel = thread_ptr->chdev->channel; 174 176 xptr_t dev_xp = chdev_dir.nic_tx[channel]; 175 177 cxy_t dev_cxy = GET_CXY( dev_xp ); … … 199 201 // block on THREAD_BLOCKED I/O condition and deschedule 200 202 thread_block( thread_ptr , THREAD_BLOCKED_IO ); 201 sched_yield( );203 sched_yield("client blocked on I/O"); 202 204 203 205 // disable NIC-TX IRQ -
trunk/kernel/devices/dev_txt.c
r407 r408 93 93 txt->server = new_thread; 94 94 95 // start server thread 96 thread_block( new_thread , THREAD_BLOCKED_DEV_QUEUE ); 95 // set "chdev" field in thread descriptor 96 new_thread->chdev = txt; 97 98 // unblock server thread 97 99 thread_unblock( XPTR( local_cxy , new_thread ) , THREAD_BLOCKED_GLOBAL ); 98 100 }
Note: See TracChangeset
for help on using the changeset viewer.