Date: Tue, 24 Feb 2004 23:52:34 +0100 From: Ivan Voras <ivoras@geri.cc.fer.hr> To: hackers@freebsd.org Subject: Screensaver Message-ID: <403BD5B2.7070504@geri.cc.fer.hr>
next in thread | raw e-mail | index | archive | help
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 ??? )""""""" `..-.,' """"""""""""" |"| .--' `--.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?403BD5B2.7070504>