Changeset fa8e7d2 in mainline


Ignore:
Timestamp:
2007-01-30T12:51:03Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
80bcaed
Parents:
b612ded6
Message:

move ipc structures to ipc.h

Location:
kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/mm/page.h

    rb612ded6 rfa8e7d2  
    4747#ifndef __ASM__
    4848
    49 //#include <arch/types.h>
    50 //#include <genarch/mm/page_ht.h>
    5149#include <arch/interrupt.h>
    5250
  • kernel/generic/include/ipc/ipc.h

    rb612ded6 rfa8e7d2  
    159159#ifdef KERNEL
    160160
    161 #include <proc/task.h>
     161#define IPC_MAX_PHONES  16
     162
     163#include <synch/waitq.h>
     164
     165struct answerbox;
     166struct task;
     167
     168typedef enum {
     169        IPC_PHONE_FREE = 0,     /**< Phone is free and can be allocated */
     170        IPC_PHONE_CONNECTING,   /**< Phone is connecting somewhere */
     171        IPC_PHONE_CONNECTED,    /**< Phone is connected */
     172        IPC_PHONE_HUNGUP,       /**< Phone is hung up, waiting for answers to come */
     173        IPC_PHONE_SLAMMED       /**< Phone was hungup from server */
     174} ipc_phone_state_t;
     175
     176/** Structure identifying phone (in TASK structure) */
     177typedef struct {
     178        SPINLOCK_DECLARE(lock);
     179        link_t link;
     180        struct answerbox *callee;
     181        ipc_phone_state_t state;
     182        atomic_t active_calls;
     183} phone_t;
     184
     185typedef struct answerbox {
     186        SPINLOCK_DECLARE(lock);
     187
     188        struct task *task;
     189
     190        waitq_t wq;
     191
     192        link_t connected_phones;        /**< Phones connected to this answerbox */
     193        link_t calls;                   /**< Received calls */
     194        link_t dispatched_calls;        /* Should be hash table in the future */
     195
     196        link_t answers;                 /**< Answered calls */
     197
     198        SPINLOCK_DECLARE(irq_lock);
     199        link_t irq_notifs;              /**< Notifications from IRQ handlers */
     200        link_t irq_head;                /**< IRQs with notifications to this answerbox. */
     201} answerbox_t;
    162202
    163203typedef struct {
     
    172212
    173213        /* Identification of the caller */
    174         task_t *sender;
     214        struct task *sender;
    175215        /* The caller box is different from sender->answerbox
    176216         * for synchronous calls
  • kernel/generic/include/proc/task.h

    rb612ded6 rfa8e7d2  
    3737
    3838#include <cpu.h>
     39#include <ipc/ipc.h>
    3940#include <synch/spinlock.h>
    4041#include <synch/mutex.h>
     
    5253#include <proc/scheduler.h>
    5354
    54 #define IPC_MAX_PHONES  16
    55 
    56 struct answerbox;
    57 struct task;
    5855struct thread;
    59 
    60 typedef enum {
    61         IPC_PHONE_FREE = 0,     /**< Phone is free and can be allocated */
    62         IPC_PHONE_CONNECTING,   /**< Phone is connecting somewhere */
    63         IPC_PHONE_CONNECTED,    /**< Phone is connected */
    64         IPC_PHONE_HUNGUP,       /**< Phone is hung up, waiting for answers to come */
    65         IPC_PHONE_SLAMMED       /**< Phone was hungup from server */
    66 } ipc_phone_state_t;
    67 
    68 /** Structure identifying phone (in TASK structure) */
    69 typedef struct {
    70         SPINLOCK_DECLARE(lock);
    71         link_t link;
    72         struct answerbox *callee;
    73         ipc_phone_state_t state;
    74         atomic_t active_calls;
    75 } phone_t;
    76 
    77 typedef struct answerbox {
    78         SPINLOCK_DECLARE(lock);
    79 
    80         struct task *task;
    81 
    82         waitq_t wq;
    83 
    84         link_t connected_phones;        /**< Phones connected to this answerbox */
    85         link_t calls;                   /**< Received calls */
    86         link_t dispatched_calls;        /* Should be hash table in the future */
    87 
    88         link_t answers;                 /**< Answered calls */
    89 
    90         SPINLOCK_DECLARE(irq_lock);
    91         link_t irq_notifs;              /**< Notifications from IRQ handlers */
    92         link_t irq_head;                /**< IRQs with notifications to this answerbox. */
    93 } answerbox_t;
    9456
    9557/** Task structure. */
Note: See TracChangeset for help on using the changeset viewer.