Changeset 1ffa73b in mainline for uspace/lib/c/generic/net/modules.c


Ignore:
Timestamp:
2011-01-10T16:33:08Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b207803
Parents:
863d45e (diff), 6610565b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge development/ changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/net/modules.c

    r863d45e r1ffa73b  
    3232
    3333/** @file
    34  * Generic module functions implementation. 
     34 * Generic module functions implementation.
    3535 *
    3636 * @todo MAKE IT POSSIBLE TO REMOVE THIS FILE VIA EITHER REPLACING PART OF ITS
     
    5252#define MODULE_WAIT_TIME        (10 * 1000)
    5353
    54 /** Answers the call.
    55  *
    56  * @param[in] callid    The call identifier.
    57  * @param[in] result    The message processing result.
    58  * @param[in] answer    The message processing answer.
    59  * @param[in] answer_count The number of answer parameters.
    60  */
    61 void
    62 answer_call(ipc_callid_t callid, int result, ipc_call_t *answer,
    63     int answer_count)
    64 {
    65         /* Choose the most efficient answer function */
    66         if (answer || (!answer_count)) {
    67                 switch (answer_count) {
     54/** Answer a call.
     55 *
     56 * @param[in] callid Call identifier.
     57 * @param[in] result Message processing result.
     58 * @param[in] answer Message processing answer.
     59 * @param[in] count  Number of answer parameters.
     60 *
     61 */
     62void answer_call(ipc_callid_t callid, int result, ipc_call_t *answer,
     63    size_t count)
     64{
     65        /* Choose the most efficient function */
     66        if ((answer != NULL) || (count == 0)) {
     67                switch (count) {
    6868                case 0:
    6969                        ipc_answer_0(callid, (sysarg_t) result);
     
    228228}
    229229
    230 /** Refreshes answer structure and parameters count.
    231  *
    232  * Erases all attributes.
    233  *
    234  * @param[in,out] answer The message processing answer structure.
    235  * @param[in,out] answer_count The number of answer parameters.
    236  */
    237 void refresh_answer(ipc_call_t *answer, int *answer_count)
    238 {
    239         if (answer_count)
    240                 *answer_count = 0;
    241 
    242         if (answer) {
     230/** Refresh answer structure and argument count.
     231 *
     232 * Erase all arguments.
     233 *
     234 * @param[in,out] answer Message processing answer structure.
     235 * @param[in,out] count  Number of answer arguments.
     236 *
     237 */
     238void refresh_answer(ipc_call_t *answer, size_t *count)
     239{
     240        if (count != NULL)
     241                *count = 0;
     242       
     243        if (answer != NULL) {
    243244                IPC_SET_RETVAL(*answer, 0);
    244                 /* Just to be precise */
    245245                IPC_SET_IMETHOD(*answer, 0);
    246246                IPC_SET_ARG1(*answer, 0);
Note: See TracChangeset for help on using the changeset viewer.