Changeset c170438 in mainline for uspace/lib/c/include/async.h


Ignore:
Timestamp:
2016-05-24T21:00:37Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2a7ba5e
Parents:
f570cdf
Message:

Do not create a new fibril for each IRQ notification

In the absence of fibril serialization, manager fibrils can
theoretically block in async IPC or on fibril synchronization
primitives. Consequently, it is safe to execute the IRQ handler directly
from the manager fibril. The manager fibril can block while processing
the notification, but most of the times it will not block and the
handler will execute atomically.

This changeset modifies the current behaviour so that we no longer spawn
a new notification fibril for each IRQ, but rather execute the handler
directly from the manager fibril and test if the execution blocked. If
it blocked, the manager fibril had assumed the role of a notification
fibril and we destroy it afterwards - merely to avoid fibril population
explosion. Otherwise, which is the usual behavior, we keep it so that
it resumes its job of a manager fibril.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/async.h

    rf570cdf rc170438  
    165165extern int async_create_callback_port(async_exch_t *, iface_t, sysarg_t,
    166166    sysarg_t, async_port_handler_t, void *, port_id_t *);
    167 
    168 extern void async_set_notification_handler_stack_size(size_t);
    169167
    170168extern int async_irq_subscribe(int, int, async_notification_handler_t, void *,
Note: See TracChangeset for help on using the changeset viewer.