Changeset 071a1ddb in mainline for uspace/lib/c/generic/async.c


Ignore:
Timestamp:
2017-12-08T21:17:27Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0722869, 569a51a
Parents:
9233e9d
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 00:30:18)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 21:17:27)
Message:

Return IRQ handles via a separate out parameter in all uspace code.

File:
1 edited

Legend:

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

    r9233e9d r071a1ddb  
    10511051 * @param ucode   Top-half pseudocode handler.
    10521052 *
    1053  * @return IRQ capability handle on success.
     1053 * @param[out] handle  IRQ capability handle on success.
     1054 *
    10541055 * @return Negative error code.
    10551056 *
    10561057 */
    10571058int async_irq_subscribe(int inr, async_notification_handler_t handler,
    1058     void *data, const irq_code_t *ucode)
     1059    void *data, const irq_code_t *ucode, cap_handle_t *handle)
    10591060{
    10601061        notification_t *notification =
     
    10781079        cap_handle_t cap;
    10791080        int rc = ipc_irq_subscribe(inr, imethod, ucode, &cap);
    1080         if (rc != EOK) {
    1081                 return rc;
    1082         }
    1083         return cap;
     1081        if (rc == EOK && handle != NULL) {
     1082                *handle = cap;
     1083        }
     1084        return rc;
    10841085}
    10851086
Note: See TracChangeset for help on using the changeset viewer.