[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Screensaver
From:       Ivan Voras <ivoras () geri ! cc ! fer ! hr>
Date:       2004-02-24 22:52:34
Message-ID: 403BD5B2.7070504 () geri ! cc ! fer ! hr
[Download RAW message or body]

I'm thinking of writing a console screen saver for fun and learning 
about kernel programming, and I have several questions (actually there 
are many, I'm just starting here :) ).

- Can VESA_800x600 mode be used in a screen-saver? What are the issues 
concering supporting more video modes both for console framebuffer and 
screensavers (IIRC, VESA 2.0 modes are all alike - simple linear 
framebuffers)?

- I've been studying existing screen savers, and I find that in FreeBSD 
5 (which is the only system I intend to support), the sources for the 
screen saver modules are located in /usr/src/sys/dev/syscons/ but the 
Makefiles are in /usr/src/sys/modules/syscons/. I find this strange. Why 
is this so and should I continue to use such layout?

- I have basic and general knowledge about locking, mutextes, and 
reading the source of dragon_saver i see this code in dragon_saver() 
function:
		...
		int pl;
		...

                 if (blanked <= 0) {
                         pl = splhigh();
                         set_video_mode(adp, VIDEO_MODE);
                         vid = (u_char *)adp->va_window;
                         curve = CURVE + 1;
                         ++blanked;
                         splx(pl);
                 }

a) why the calls to spl...() functions? What do they do in this case?
b) I read in the manpages that the spl...() functions are deprecated and 
I should use mutex(9) functions. How would the above code use mutexes?

- what functions can I call in a kernel module (kld)? Can sysctl(3) be 
called? The rest of libc? External libraries? (actually, what are the 
things that I can and can't do in a kld?)


Thanks for your time, I'll probably be back with more :)

-- 
              `\|/'     .---------------.
              ,'Y`.   _( To think....    )_________
             )|._.|( ( Doesn't that involve little )
             /(___)\  ""( little lightbulbs over )"
            (       )    ""( My head ??? )"""""""
             `..-.,'        """""""""""""
               |"|
            .--' `--.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic