Changeset 754 for soft/giet_vm/giet_kernel
- Timestamp:
- Jan 7, 2016, 4:12:54 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_kernel/sys_handler.c
r753 r754 194 194 &_sys_fbf_size, /* 0x08 */ 195 195 &_sys_fbf_alloc, /* 0x09 */ 196 197 #if NB_CMA_CHANNELS 196 198 &_sys_fbf_cma_alloc, /* 0x0A */ 197 199 &_sys_fbf_cma_init_buf, /* 0x0B */ … … 200 202 &_sys_fbf_cma_stop, /* 0x0E */ 201 203 &_sys_fbf_cma_check, /* 0x0F */ 204 #else 205 &_sys_ukn, /* 0x0A */ 206 &_sys_ukn, /* 0x0B */ 207 &_sys_ukn, /* 0x0C */ 208 &_sys_ukn, /* 0x0D */ 209 &_sys_ukn, /* 0x0E */ 210 &_sys_ukn, /* 0x0F */ 211 #endif 202 212 203 213 &_sys_applications_status, /* 0x10 */ … … 235 245 &_sys_ukn, /* 0x2F */ 236 246 247 #if NB_NIC_CHANNELS 237 248 &_sys_nic_alloc, /* 0x30 */ 238 249 &_sys_nic_start, /* 0x31 */ … … 241 252 &_sys_nic_stats, /* 0x34 */ 242 253 &_sys_nic_clear, /* 0x35 */ 254 #else 255 &_sys_ukn, /* 0x30 */ 256 &_sys_ukn, /* 0x31 */ 257 &_sys_ukn, /* 0x32 */ 258 &_sys_ukn, /* 0x33 */ 259 &_sys_ukn, /* 0x34 */ 260 &_sys_ukn, /* 0x35 */ 261 #endif 262 243 263 &_sys_tty_write, /* 0x36 */ 244 264 &_sys_tty_read, /* 0x37 */ … … 1540 1560 int _sys_tty_alloc( unsigned int shared ) 1541 1561 { 1542 unsigned int channel ; // allocated TTY channel1543 1544 // get trdid andvsid for the calling thread1562 unsigned int channel = 0; // allocated TTY channel 1563 1564 // get vsid for the calling thread 1545 1565 unsigned int vsid = _get_context_slot( CTX_VSID_ID ); 1546 unsigned int trdid = _get_thread_trdid();1547 1566 1548 1567 mapping_header_t *header = (mapping_header_t *)SEG_BOOT_MAPPING_BASE; … … 1555 1574 else users = 1; 1556 1575 1576 #if NB_TTY_CHANNELS > 1 1577 // get trdid for the calling thread 1578 unsigned int trdid = _get_thread_trdid(); 1579 1557 1580 // get a TTY channel 1558 1581 for ( channel = 0 ; channel < NB_TTY_CHANNELS ; channel++ ) … … 1562 1585 if ( _atomic_test_and_set( palloc , users ) == 0 ) break; 1563 1586 } 1564 if ( channel >= NB_TTY_CHANNELS)1587 if ( ( channel >= NB_TTY_CHANNELS ) ) 1565 1588 { 1566 1589 _printf("\n[GIET_ERROR] in _sys_tty_alloc() : " … … 1582 1605 unsigned int p = procid & ((1<<P_WIDTH)-1); 1583 1606 _tty_channel_wti[channel] = x<<24 | y<<16 | p<<8 | wti_id; 1607 1608 #else 1609 1610 unsigned int* palloc = &_tty_channel_alloc[0]; 1611 _atomic_increment( palloc, users ); 1612 1613 #endif 1584 1614 1585 1615 // update CTX_TTY_ID … … 1905 1935 #define NIC_CONTAINER_SIZE 4096 1906 1936 1907 #if NB_NIC_CHANNELS 1937 #if NB_NIC_CHANNELS && NB_CMA_CHANNELS 1908 1938 1909 1939 //////////////////////////////////////// … … 2684 2714 } // end _sys_nic_stats() 2685 2715 2686 #endif 2716 #endif // if NB_NIC_CHANNELS && NB_CMA_CHANNELS 2687 2717 2688 2718 ///////////////////////////////////////////////////////////////////////////////////////// … … 2817 2847 } 2818 2848 2849 #if NB_CMA_CHANNELS 2850 2819 2851 //////////////////////////////////////////// 2820 2852 int _sys_fbf_cma_alloc( unsigned int nbufs ) … … 3294 3326 3295 3327 } // end _sys_fbf_cma_stop() 3328 3329 #endif // if NB_CMA_CHANNELS 3296 3330 3297 3331
Note: See TracChangeset
for help on using the changeset viewer.