Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1922 → Rev 1923

/trunk/kernel/generic/include/ipc/sysipc.h
38,6 → 38,7
#include <ipc/ipc.h>
#include <ipc/irq.h>
#include <arch/types.h>
#include <typedefs.h>
 
unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method,
unative_t arg1, ipc_data_t *data);
53,8 → 54,8
unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid,
unative_t method, unative_t arg1);
unative_t sys_ipc_hangup(int phoneid);
unative_t sys_ipc_register_irq(int irq, irq_code_t *ucode);
unative_t sys_ipc_unregister_irq(int irq);
unative_t sys_ipc_register_irq(inr_t inr, devno_t devno, unative_t method, irq_code_t *ucode);
unative_t sys_ipc_unregister_irq(inr_t inr, devno_t devno);
 
#endif
 
/trunk/kernel/generic/include/ipc/ipc.h
155,8 → 155,7
 
#ifdef KERNEL
 
#include <synch/mutex.h>
#include <synch/condvar.h>
#include <synch/waitq.h>
#include <adt/list.h>
 
#define IPC_MAX_PHONES 16
/trunk/kernel/generic/include/ipc/irq.h
38,12 → 38,9
/** Maximum length of IPC IRQ program */
#define IRQ_MAX_PROG_SIZE 10
 
/** Reserved 'virtual' messages for kernel notifications */
#define IPC_IRQ_RESERVED_VIRTUAL 10
#define VIRT_INR_KLOG -2
#define VIRT_INR_KBDRESTART -3
 
#define IPC_IRQ_KLOG (-1)
#define IPC_IRQ_KBDRESTART (-2)
 
typedef enum {
CMD_MEM_READ_1 = 0,
CMD_MEM_READ_2,
75,13 → 72,26
#ifdef KERNEL
 
#include <ipc/ipc.h>
#include <typedefs.h>
#include <arch/types.h>
 
extern void ipc_irq_make_table(int irqcount);
extern int ipc_irq_register(answerbox_t *box, int irq, irq_code_t *ucode);
extern void ipc_irq_send_notif(int irq);
extern void ipc_irq_send_msg(int irq, unative_t a1, unative_t a2, unative_t a3);
extern void ipc_irq_unregister(answerbox_t *box, int irq);
extern void irq_ipc_bind_arch(unative_t irq);
/** 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 {
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. */
};
 
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);
extern void ipc_irq_send_msg(irq_t *irq, unative_t a1, unative_t a2, unative_t a3);
extern void ipc_irq_unregister(answerbox_t *box, inr_t inr, devno_t devno);
extern void ipc_irq_cleanup(answerbox_t *box);
 
#endif