Changeset 6d9c49a in mainline for generic/include


Ignore:
Timestamp:
2006-03-13T19:39:30Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45d6add
Parents:
78a95d6f
Message:

Added kernel IPC functionality.

Location:
generic/include
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • generic/include/mm/page.h

    r78a95d6f r6d9c49a  
    3333#include <arch/types.h>
    3434#include <typedefs.h>
     35#include <memstr.h>
    3536
    3637#define PAGE_CACHEABLE_SHIFT            0
     
    6061#define PAGE_GLOBAL             (1<<PAGE_GLOBAL_SHIFT)
    6162
     63
     64/* TODO - check that userspace is OK, platform specific functions etc */
     65static inline void copy_to_uspace(void *dst, void *src, count_t cnt)
     66{
     67        memcpy(dst, src, cnt);
     68}
     69
     70static inline void copy_to_kernel(void *dst, void *src, count_t cnt)
     71{
     72        memcpy(dst, src, cnt);
     73}
     74
    6275/** Operations to manipulate page mappings. */
    6376struct page_mapping_operations {
  • generic/include/proc/task.h

    r78a95d6f r6d9c49a  
    3333#include <synch/spinlock.h>
    3434#include <adt/list.h>
     35#include <ipc/ipc.h>
    3536
    3637/** Task structure. */
     
    4041        link_t tasks_link;      /**< Link to other tasks within the system. */
    4142        as_t *as;               /**< Address space. */
     43        answerbox_t answerbox;  /**< Communication endpoint */
     44        phone_t phones[IPC_MAX_PHONES];
    4245};
    4346
  • generic/include/syscall/syscall.h

    r78a95d6f r6d9c49a  
    3030#define __SYSCALL_H__
    3131
    32 #include <typedefs.h>
    33 
    3432typedef enum {
    3533        SYS_CTL = 0,
    3634        SYS_IO  = 1,
     35        SYS_IPC_CALL = 2,
     36        SYS_IPC_ANSWER = 3,
     37        SYS_IPC_WAIT = 4,
    3738        SYSCALL_END
    3839} syscall_t;
    3940
    40 typedef int (*syshandler_t)();
     41#ifdef KERNEL
    4142
    42 extern int sys_ctl(void);
    43 extern int sys_io(int fd, const void *buf, size_t count);
     43#include <arch/types.h>
     44#include <typedefs.h>
     45
     46typedef __native (*syshandler_t)();
    4447
    4548extern syshandler_t syscall_table[SYSCALL_END];
    4649
    4750#endif
     51
     52#endif
Note: See TracChangeset for help on using the changeset viewer.