Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2088 → Rev 2089

/trunk/kernel/generic/include/ipc/irq.h
38,57 → 38,11
/** Maximum length of IPC IRQ program */
#define IRQ_MAX_PROG_SIZE 10
 
typedef enum {
CMD_MEM_READ_1 = 0,
CMD_MEM_READ_2,
CMD_MEM_READ_4,
CMD_MEM_READ_8,
CMD_MEM_WRITE_1,
CMD_MEM_WRITE_2,
CMD_MEM_WRITE_4,
CMD_MEM_WRITE_8,
CMD_PORT_READ_1,
CMD_PORT_WRITE_1,
CMD_IA64_GETCHAR,
CMD_PPC32_GETCHAR,
CMD_LAST
} irq_cmd_type;
 
typedef struct {
irq_cmd_type cmd;
void *addr;
unsigned long long value;
int dstarg;
} irq_cmd_t;
 
typedef struct {
unsigned int cmdcount;
irq_cmd_t *cmds;
} irq_code_t;
 
#ifdef KERNEL
 
#include <ipc/ipc.h>
#include <typedefs.h>
#include <ddi/irq.h>
#include <arch/types.h>
#include <adt/list.h>
 
/** IPC notification config structure.
*
* Primarily, this structure is encapsulated in the irq_t structure.
* It is protected by irq_t::lock.
*/
struct ipc_notif_cfg {
bool notify; /**< When false, notifications are not sent. */
answerbox_t *answerbox; /**< Answerbox for notifications. */
unative_t method; /**< Method to be used for the notification. */
irq_code_t *code; /**< Top-half pseudocode. */
count_t counter; /**< Counter. */
link_t link; /**< Link between IRQs that are notifying the
same answerbox. The list is protected by
the answerbox irq_lock. */
};
 
extern int ipc_irq_register(answerbox_t *box, inr_t inr, devno_t devno, unative_t method,
irq_code_t *ucode);
extern void ipc_irq_send_notif(irq_t *irq);
98,7 → 52,5
 
#endif
 
#endif
 
/** @}
*/