Changeset b74959bd in mainline for uspace/srv/console/console.c


Ignore:
Timestamp:
2007-11-20T21:33:32Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8498915
Parents:
3209923
Message:

Modify ipc_answer_*() to make use of all six syscall arguments. The recommended
means of answering calls is via the ipc_answer_m() macros (where m denotes the
number of return arguments) that automatically decide between the fast register
version or the slow universal version of ipc_answer().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/console/console.c

    r3209923 rb74959bd  
    278278                for (j = 0; j < conn->screenbuffer.size_y; j++)
    279279                        for (i = 0; i < conn->screenbuffer.size_x; i++) {
    280                                 field = get_field_at(&conn->screenbuffer, i,
    281                                     j);
     280                                field = get_field_at(&conn->screenbuffer, i, j);
    282281                                if (!style_same(*style, field->style))
    283282                                        set_style(&field->style);
     
    350349                        if (conn->keyrequest_counter > 0) {             
    351350                                conn->keyrequest_counter--;
    352                                 ipc_answer_fast(fifo_pop(conn->keyrequests), 0,
    353                                     c, 0);
     351                                ipc_answer_1(fifo_pop(conn->keyrequests), EOK,
     352                                    c);
    354353                                break;
    355354                        }
     
    362361                        retval = ENOENT;
    363362                }
    364                 ipc_answer_fast(callid, retval, 0, 0);
     363                ipc_answer_0(callid, retval);
    365364        }
    366365}
     
    376375
    377376        if ((consnum = find_free_connection()) == -1) {
    378                 ipc_answer_fast(iid, ELIMIT, 0, 0);
     377                ipc_answer_0(iid, ELIMIT);
    379378                return;
    380379        }
     
    388387       
    389388        /* Accept the connection */
    390         ipc_answer_fast(iid, 0, 0, 0);
     389        ipc_answer_0(iid, EOK);
    391390
    392391        while (1) {
     
    404403                        while (conn->keyrequest_counter > 0) {         
    405404                                conn->keyrequest_counter--;
    406                                 ipc_answer_fast(fifo_pop(conn->keyrequests),
    407                                     ENOENT, 0, 0);
     405                                ipc_answer_0(fifo_pop(conn->keyrequests),
     406                                    ENOENT);
    408407                                break;
    409408                        }
     
    465464                                         * requests => fail.
    466465                                        */
    467                                         ipc_answer_fast(callid, ELIMIT, 0, 0);
     466                                        ipc_answer_0(callid, ELIMIT);
    468467                                }
    469468                                continue;
     
    472471                        break;
    473472                }
    474                 ipc_answer_fast(callid, 0, arg1, arg2);
     473                ipc_answer_2(callid, EOK, arg1, arg2);
    475474        }
    476475}
Note: See TracChangeset for help on using the changeset viewer.