[142] | 1 | /* $Id: task.c 147 2000-04-24 19:45:21Z sandervl $ */
|
---|
| 2 |
|
---|
| 3 | //******************************************************************************
|
---|
| 4 | // OS/2 implementation of Linux task kernel services
|
---|
| 5 | //
|
---|
| 6 | // Copyright 2000 Sander van Leeuwen (sandervl@xs4all.nl)
|
---|
| 7 | //
|
---|
| 8 | // This program is free software; you can redistribute it and/or
|
---|
| 9 | // modify it under the terms of the GNU General Public License as
|
---|
| 10 | // published by the Free Software Foundation; either version 2 of
|
---|
| 11 | // the License, or (at your option) any later version.
|
---|
| 12 | //
|
---|
| 13 | // This program is distributed in the hope that it will be useful,
|
---|
| 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 16 | // GNU General Public License for more details.
|
---|
| 17 | //
|
---|
| 18 | // You should have received a copy of the GNU General Public
|
---|
| 19 | // License along with this program; if not, write to the Free
|
---|
| 20 | // Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
|
---|
| 21 | // USA.
|
---|
| 22 | //
|
---|
| 23 | //******************************************************************************
|
---|
| 24 | #include <linux/version.h>
|
---|
| 25 | #include <linux/kernel.h>
|
---|
| 26 | #include <linux/fs.h>
|
---|
| 27 | #include <linux/tqueue.h>
|
---|
| 28 | #define LINUX
|
---|
| 29 | #include <ossdefos2.h>
|
---|
| 30 |
|
---|
| 31 | struct task_struct current_task = {0};
|
---|
| 32 | struct task_struct *current = ¤t_task;
|
---|
| 33 |
|
---|
| 34 | void tasklet_hi_schedule(struct tq_struct *t)
|
---|
| 35 | {
|
---|
| 36 | if(t && t->routine) {
|
---|
| 37 | t->routine(t->data);
|
---|
| 38 | }
|
---|
| 39 | }
|
---|
| 40 |
|
---|
[147] | 41 | //Not pretty, but sblive driver compares pointers
|
---|
[142] | 42 | ULONG OSS32_SetFileId(ULONG fileid)
|
---|
| 43 | {
|
---|
| 44 | ULONG oldfileid = (ULONG)current_task.files;
|
---|
| 45 |
|
---|
| 46 | current_task.files = (struct files_struct *)fileid;
|
---|
| 47 | return oldfileid;
|
---|
| 48 | }
|
---|