Changeset 6675c70 in mainline


Ignore:
Timestamp:
2007-09-20T16:38:46Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8f9ede5
Parents:
d2d0baf
Message:

In async_new_connection(), be more robust in the case that the function
is called by the server directly after its client accepts the
IPC_M_CONNECT_TO_ME call.

In fat.c main(), kill the "main" fibril and switch to the connection
fibril.

Location:
uspace
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/async.c

    rd2d0baf r6675c70  
    458458 * @param in_phone_hash Identification of the incoming connection.
    459459 * @param callid        Hash of the opening IPC_M_CONNECT_ME_TO call.
     460 *                      If callid is zero, the connection was opened by
     461 *                      accepting the IPC_M_CONNECT_TO_ME call and this function
     462 *                      is called directly by the server.
    460463 * @param call          Call data of the opening call.
    461464 * @param cfibril       Fibril function that should be called upon opening the
     
    472475        conn = malloc(sizeof(*conn));
    473476        if (!conn) {
    474                 ipc_answer_fast(callid, ENOMEM, 0, 0);
     477                if (callid)
     478                        ipc_answer_fast(callid, ENOMEM, 0, 0);
    475479                return NULL;
    476480        }
     
    487491        if (!conn->wdata.fid) {
    488492                free(conn);
    489                 ipc_answer_fast(callid, ENOMEM, 0, 0);
     493                if (callid)
     494                        ipc_answer_fast(callid, ENOMEM, 0, 0);
    490495                return NULL;
    491496        }
  • uspace/srv/fs/fat/fat.c

    rd2d0baf r6675c70  
    122122
    123123        /*
    124          * TODO: Interestingly, if we return, the only thread dies.
     124         * TODO: Interestingly, if we merely return, the only thread dies.
    125125         *       If the only thread dies, the whole task is destroyed.
    126126         *       Prevent the thread from exiting when there are active fibrils.
    127127         */
    128         while(1)
    129                 usleep(1000000);
    130        
     128        fibril_schedule_next_adv(FIBRIL_FROM_DEAD);
     129        /* not reached */
     130
    131131        return 0;
    132132}
Note: See TracChangeset for help on using the changeset viewer.