Changeset 6c46350 in mainline


Ignore:
Timestamp:
2006-06-03T00:30:11Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7f079d9
Parents:
27386e6a
Message:

Fixed some weird bugs (I wonder how this COULD even work on the other platforms).

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/async.c

    r27386e6a r6c46350  
    217217/** Insert sort timeout msg into timeouts list
    218218 *
    219  * Assume async_futex is held
    220219 */
    221220static void insert_timeout(awaiter_t *wd)
     
    284283        msg_t *msg;
    285284        ipc_callid_t callid;
     285        connection_t *conn;
    286286       
    287287        assert(PS_connection);
     288        /* GCC 4.1.0 coughs on PS_connection-> dereference,
     289         * GCC 4.1.1 happilly puts the rdhwr instruction in delay slot.
     290         *           I would never expect to find so many errors in
     291         *           compiler *($&$(*&$
     292         */
     293        conn = PS_connection;
    288294
    289295        if (usecs < 0) /* TODO: let it get through the ipc_call once */
     
    293299
    294300        if (usecs) {
    295                 gettimeofday(&PS_connection->wdata.expires, NULL);
    296                 tv_add(&PS_connection->wdata.expires, usecs);
     301                gettimeofday(&conn->wdata.expires, NULL);
     302                tv_add(&conn->wdata.expires, usecs);
    297303        } else {
    298                 PS_connection->wdata.inlist = 0;
     304                conn->wdata.inlist = 0;
    299305        }
    300306        /* If nothing in queue, wait until something appears */
    301         while (list_empty(&PS_connection->msg_queue)) {
     307        while (list_empty(&conn->msg_queue)) {
    302308                if (usecs) {
    303                         PS_connection->wdata.inlist = 1;
    304                         insert_timeout(&PS_connection->wdata);
     309                        conn->wdata.inlist = 1;
     310                        insert_timeout(&conn->wdata);
    305311                }
    306                 PS_connection->wdata.active = 0;
     312                conn->wdata.active = 0;
    307313                psthread_schedule_next_adv(PS_TO_MANAGER);
    308314                /* Futex is up after getting back from async_manager
    309315                 * get it again */
    310316                futex_down(&async_futex);
    311                 if (usecs && PS_connection->wdata.timedout && \
    312                     list_empty(&PS_connection->msg_queue)) {
     317                if (usecs && conn->wdata.timedout && \
     318                    list_empty(&conn->msg_queue)) {
    313319                        /* If we timed out-> exit */
    314320                        futex_up(&async_futex);
     
    317323        }
    318324       
    319         msg = list_get_instance(PS_connection->msg_queue.next, msg_t, link);
     325        msg = list_get_instance(conn->msg_queue.next, msg_t, link);
    320326        list_remove(&msg->link);
    321327        callid = msg->callid;
     
    451457}
    452458
    453 /** Fire all timeouts that expired */
     459/** Fire all timeouts that expired
     460 *
     461 */
    454462static void handle_expired_timeouts(void)
    455463{
     
    503511                        gettimeofday(&tv,NULL);
    504512                        if (tv_gteq(&tv, &waiter->expires)) {
     513                                futex_up(&async_futex);
    505514                                handle_expired_timeouts();
    506515                                continue;
  • libc/generic/io/stream.c

    r27386e6a r6c46350  
    5252
    5353static int console_phone = -1;
    54 static stream_t streams[FDS] = {{0, 0, 0, -1}};
     54static stream_t streams[FDS];
    5555
    5656static ssize_t write_stderr(void *param, const void *buf, size_t count)
     
    117117       
    118118        stream.w = write_stdout;
     119        stream.phone = console_phone;
    119120        stream.param = 0;
    120121        return stream;
  • tetris/Makefile

    r27386e6a r6c46350  
    1111.PHONY: all clean depend disasm
    1212
    13 all: $(OUTPUT)
     13all: $(OUTPUT) disasm
    1414
    1515-include Makefile.depend
Note: See TracChangeset for help on using the changeset viewer.