diff options
author | Mike Shaver <shaver@ingenia.com> | 1997-08-10 22:24:11 +0000 |
---|---|---|
committer | Mike Shaver <shaver@ingenia.com> | 1997-08-10 22:24:11 +0000 |
commit | 5c10bcd1cd1bc411076fdc3bb414193f2d78f57d (patch) | |
tree | 8d612b6a2ded7ce44a67cc2634003975aa05602c /include/asm-mips | |
parent | 52365146a9da3ea5defe960af8b6d320d4dd7fcc (diff) |
Added skeletal support for /dev/usema and /dev/usemaclone.
Still need to figure out how to do SVR-style clone devices with
fops->open(), and I need a good poll() tutorial. =)
Other than that, I think I know how to do:
/dev/usemaclone open()ing, poll()ing
/dev/usema ioctls:
- UIOCATTACHSEMA
- UIOCBLOCK
- UIOCUNBLOCK
Also, some minor additions to sysirix.c:syssgi().
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/shmiq.h | 4 | ||||
-rw-r--r-- | include/asm-mips/usioctl.h | 26 |
2 files changed, 29 insertions, 1 deletions
diff --git a/include/asm-mips/shmiq.h b/include/asm-mips/shmiq.h index 2e845113f..d07633d79 100644 --- a/include/asm-mips/shmiq.h +++ b/include/asm-mips/shmiq.h @@ -174,8 +174,10 @@ typedef struct { char *nothing_for_now; } idevInfo; +#define IDEV_KEYMAP_NAME_LEN 15 + typedef struct { - char name [16]; + char name[IDEV_KEYMAP_NAME_LEN+1]; } idevKeymapDesc; #define IDEVINITDEVICE _IOW('i', 51, unsigned int) diff --git a/include/asm-mips/usioctl.h b/include/asm-mips/usioctl.h new file mode 100644 index 000000000..b4edeb5cf --- /dev/null +++ b/include/asm-mips/usioctl.h @@ -0,0 +1,26 @@ +/* + * usema/usemaclone-related stuff. + * + * `Inspired' by IRIX's sys/usioctl.h + * + * Mike. + */ + +/* ioctls */ +#define UIOC ('u' << 16 | 's' << 8) + +#define UIOCATTACHSEMA (UIOC|2) /* attach to sema */ +#define UIOCBLOCK (UIOC|3) /* block sync "intr"? */ +#define UIOCABLOCK (UIOC|4) /* block async */ +#define UIOCNOIBLOCK (UIOC|5) /* block sync "intr"? + How is this different from + UIOCNOIBLOCK? */ +#define UIOCUNBLOCK (UIOC|6) /* unblock sync */ +#define UIOCAUNBLOCK (UIOC|7) /* unblock async */ +#define UIOCINIT (UIOC|8) /* init sema (async) */ + +typedef struct usattach_s { + dev_t us_dev; /* attach dev */ + void *us_handle; /* userland semaphore handle */ +} usattach_t; + |