Changeset d32af35 in mainline
- Timestamp:
- 2006-06-04T17:56:05Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a8b2b5b
- Parents:
- 74ebc64
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
console/console.c
r74ebc64 rd32af35 79 79 * 80 80 */ 81 static int find_free_connection( )81 static int find_free_connection(void) 82 82 { 83 83 int i = 0; 84 84 85 while (i < CONSOLE_COUNT) {86 if ( connections[i].used == 0)85 for (i=0; i < CONSOLE_COUNT; i++) { 86 if (!connections[i].used) 87 87 return i; 88 ++i; 89 } 90 return CONSOLE_COUNT; 91 } 92 93 /** Find index of virtual console used by client with given phone. 94 * 95 */ 96 static int find_connection(int client_phone) 97 { 98 int i = 0; 99 100 while (i < CONSOLE_COUNT) { 101 if (connections[i].client_phone == client_phone) 102 return i; 103 ++i; 104 } 105 return CONSOLE_COUNT; 88 } 89 return -1; 106 90 } 107 91 … … 340 324 ipcarg_t arg1, arg2; 341 325 342 if ((consnum = find_free_connection()) == CONSOLE_COUNT) {326 if ((consnum = find_free_connection()) == -1) { 343 327 ipc_answer_fast(iid,ELIMIT,0,0); 344 328 return; … … 449 433 gcons_init(fb_info.phone); 450 434 /* Synchronize, the gcons can have something in queue */ 451 sync_send _2(fb_info.phone, FB_GET_CSIZE, 0, 0, NULL, NULL);435 sync_send(fb_info.phone, FB_FLUSH, 0, NULL); 452 436 453 437 … … 470 454 } 471 455 } 456 connections[KERNEL_CONSOLE].used = 1; 472 457 473 458 if ((interbuffer = mmap(NULL, sizeof(keyfield_t) * fb_info.cols * fb_info.rows , PROTO_READ|PROTO_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, 0 ,0 )) != NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.