schemix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Schemix-devel] Some big changes in CVS


From: Dr William Bland
Subject: [Schemix-devel] Some big changes in CVS
Date: Mon, 5 May 2003 18:57:42 +0000
User-agent: Mutt/1.2i

Hello all,
        I have resolved the issue that meant Schemix could only access
symbols that were exported from the kernel.  I had to find and apply the
"kallsyms" patch to get this working, but it didn't seem too hard to do.
Schemix now depends on the kallsyms patch (I'm not exactly sure to what
extent - perhaps it will still compile without it, but the kernel-*
special forms won't work without kallsyms).

I have also changed things so that Schemix will now compile as a module.
All you have to do is change the 'bool' in Config.in to a 'tristate' and
it will now compile properly.

Having got this all working, I took the opportunity to write a simple
/proc style interface to the kernel.  If you look in the kernel source, in
kernel/fork.c you will find a variable "int nr_threads" that holds the
number of processes currently running.  I used this to make the following
simple interface:

; device to report the number of currently running processes
(make-device number_of_procs
             ((*on-write* (lambda (msg) #f)) ; interface is non-writable
              (this-time #t) ; so *on-read* doesn't loop infinitely
              (nr_threads_getter (kernel-getter (int) nr_threads))
              (*on-read* (lambda ()
                             (cond (this-time
                                    (display (nr_threads_getter))
                                    (newline)
                                    (set! this-time #f))
                                   (else
                                    (set! this-time #t)))))))

Enjoy!
Best wishes,
                Bill.
-- 
Dr. William Bland.                          Computer Programmer, UK.
www.abstractnonsense.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]