Changeset a46da63 in mainline for libc/generic/async.c


Ignore:
Timestamp:
2006-06-16T20:50:51Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
153a209
Parents:
b34fab6
Message:

big code cleanup, compile with -Wall -Werror to enforce better coding
there is currently one warning that requires attention, please review

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/async.c

    rb34fab6 ra46da63  
    2727 */
    2828
    29  /** @addtogroup libc
     29/** @addtogroup libc
    3030 * @{
    3131 */
     
    374374        PS_connection = (connection_t *)arg;
    375375        PS_connection->cthread(PS_connection->callid, &PS_connection->call);
     376       
    376377        /* Remove myself from connection hash table */
    377378        futex_down(&async_futex);
     
    379380        hash_table_remove(&conn_hash_table, &key, 1);
    380381        futex_up(&async_futex);
     382       
    381383        /* Answer all remaining messages with ehangup */
    382384        while (!list_empty(&PS_connection->msg_queue)) {
     
    390392        if (PS_connection->close_callid)
    391393                ipc_answer_fast(PS_connection->close_callid, 0, 0, 0);
     394       
     395        return 0;
    392396}
    393397
     
    406410 * @return New thread id
    407411 */
    408 pstid_t async_new_connection(ipcarg_t in_phone_hash,ipc_callid_t callid,
    409                              ipc_call_t *call,
    410                              void (*cthread)(ipc_callid_t,ipc_call_t *))
    411 {
    412         pstid_t ptid;
     412pstid_t async_new_connection(ipcarg_t in_phone_hash,ipc_callid_t callid, ipc_call_t *call, void (*cthread)(ipc_callid_t, ipc_call_t *))
     413{
    413414        connection_t *conn;
    414415        unsigned long key;
     
    515516        while (1) {
    516517                if (psthread_schedule_next_adv(PS_FROM_MANAGER)) {
    517                         futex_up(&async_futex); /* async_futex is always held
    518                                                 * when entering manager thread
    519                                                 */
     518                        futex_up(&async_futex);
     519                        /* async_futex is always held
     520                         * when entering manager thread
     521                         */
    520522                        continue;
    521523                }
     
    547549                handle_call(callid, &call);
    548550        }
     551       
     552        return 0;
    549553}
    550554
     
    558562static int async_manager_thread(void *arg)
    559563{
    560         futex_up(&async_futex); /* async_futex is always locked when entering
    561                                 * manager */
     564        futex_up(&async_futex);
     565        /* async_futex is always locked when entering
     566         * manager */
    562567        async_manager_worker();
     568       
     569        return 0;
    563570}
    564571
     
    586593        }
    587594       
     595        return 0;
    588596}
    589597
     
    680688{
    681689        amsg_t *msg = (amsg_t *) amsgid;
    682         connection_t *conn;
    683690
    684691        futex_down(&async_futex);
     
    712719{
    713720        amsg_t *msg = (amsg_t *) amsgid;
    714         connection_t *conn;
    715721
    716722        /* TODO: Let it go through the event read at least once */
     
    803809
    804810
    805  /** @}
    806  */
    807  
    808  
     811/** @}
     812 */
Note: See TracChangeset for help on using the changeset viewer.