On Thu, 5 Aug 1999, Arun Sharma wrote:

> I wonder if so much assembly code is really necessary for FreeBSD. One
> argument for minimal usage of assembly code is that it is easier to code
> non trivial algorithms in C.

No, so much isn't really necessary.

> 
> One such example is the scheduler. Since the decision about which process
> is going to run next is decided in assembly code, it is restricted to a
> relatively dumb algorithm of scanning the runqs and picking one. If the
> mechanism (i.e nuts and bolts of the context switch) is coded in assembly
> and the policy (which process to pick next) is done in C, the code would
> be much more maintainable, IMO.
> 
> How do people feel about it here ?

I feel that very low-level things need to be implemented in terms of
in-line assembly in machdep files or headers, like inb/outb/etc.
Coding much in assembly should be a very last resort. There really
should not be any of those assembly files. They should all be C with
whatever inline assembler is necessary or a call to the machine-dependent
routines. Various things like, say, i586_bzero are assembly for good
reason, but shouldn't be in assembly file format, IMHO. The scheduling
code should DEFINITELY not be in assembly, but only have machine
dependent calls for specific actions that need to be done manually in
assembly.

> 
>       -Arun
> 

 Brian Fundakowski Feldman      _ __ ___ ____  ___ ___ ___  
 [EMAIL PROTECTED]                   _ __ ___ | _ ) __|   \ 
     FreeBSD: The Power to Serve!        _ __ | _ \._ \ |) |
       http://www.FreeBSD.org/              _ |___/___/___/ 



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to