mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-09 04:15:52 +00:00
irq_connection: add constructor with session label
When creating an Irq connection to a component (not core), e.g. a pin driver, we typically need a to provide a session label in order to apply a session policy and to distinguish multiple sessions from the same component. genodelabs/genode#4606
This commit is contained in:
parent
c0e303632e
commit
f25070d441
@ -42,6 +42,26 @@ struct Genode::Irq_connection : Connection<Irq_session>, Irq_session_client
|
||||
irq, trigger, polarity, device_config_phys)),
|
||||
Irq_session_client(cap())
|
||||
{ }
|
||||
|
||||
/**
|
||||
* Constructor for label-based configuration (used by pin driver)
|
||||
*
|
||||
* \param label session label
|
||||
*/
|
||||
Irq_connection(Env &env,
|
||||
char const *label)
|
||||
:
|
||||
Connection<Irq_session>(env, session(env.parent(),
|
||||
"ram_quota=%u, cap_quota=%u, "
|
||||
"irq_number=%u, irq_trigger=%u, "
|
||||
"irq_polarity=%u, device_config_phys=0x%lx, "
|
||||
"label=\"%s\"",
|
||||
RAM_QUOTA, CAP_QUOTA, 0,
|
||||
Irq_session::TRIGGER_UNCHANGED,
|
||||
Irq_session::POLARITY_UNCHANGED,
|
||||
0, label)),
|
||||
Irq_session_client(cap())
|
||||
{ }
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__IRQ_SESSION__CONNECTION_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user