RE: task_ops?

Mike Jagdis (mike@roan.co.uk)
Wed, 7 Jan 1998 09:13:23 +0000 (GMT/BST)


On Tue, 6 Jan 1998, Noel Burton-Krahn wrote:

> At first I thought I could just write another personality with a new
> exec_domain, but after looking at execdomain.c and entry.S I'm not
> sure. entry.S has entries for both lcall7 and syscall. There's only
> one lcall7 function defined in the kernel, and that sends SEGV.
>
> What are the semantics of an lcall7 handler and what's the difference
> between lcall7 and syscall? Perhaps there should be another entry in
> exec_domain for a syscall handler?

Get the iBCS emulator from tsx-11.mit.edu:/pub/linux/BETA/ibcs2/ and
look especially at the end of emulate.c where the module initializaion
registers personalities.

lcall7 is the way SYSV derived Unices do syscalls. Linux uses
ints. Hence there are two syscall entry points in entry.S. Only
the lcall7 entry switches handler based on personality. If you want
the standard Linux entry to pay attention to personality you will
have to do a small amount of work - and convince Linus that what
you are doing is worth a few extra instructions in the path.

Of course, if you are in control of how syscalls are made (as
you may well be with emulation of another CPU) you could just
have the emulator use lcall7 (or even add another entry point)
for application calls and standard Linux for anything the emulator
itself does (this is what the, obsolete, Xenix/286 emulator did).

Mike

-- 
.----------------------------------------------------------------------.
|  Mike Jagdis                  |  Internet:  mailto:mike@roan.co.uk   |
|  Roan Technology Ltd.         |                                      |
|  54A Peach Street, Wokingham  |  Telephone:  +44 118 989 0403        |
|  RG40 1XG, ENGLAND            |  Fax:        +44 118 989 1195        |
`----------------------------------------------------------------------'