From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 24 14:52:39 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70E4F16A4CE for ; Tue, 24 Feb 2004 14:52:39 -0800 (PST) Received: from geri.cc.fer.hr (geri.cc.fer.hr [161.53.72.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9AB943D1D for ; Tue, 24 Feb 2004 14:52:38 -0800 (PST) (envelope-from ivoras@geri.cc.fer.hr) Received: from geri.cc.fer.hr (geri.cc.fer.hr [161.53.72.107]) by geri.cc.fer.hr (8.12.9p2/8.12.8) with ESMTP id i1OMqImR026574 for ; Tue, 24 Feb 2004 23:52:19 +0100 (CET) (envelope-from ivoras@geri.cc.fer.hr) Message-ID: <403BD5B2.7070504@geri.cc.fer.hr> Date: Tue, 24 Feb 2004 23:52:34 +0100 From: Ivan Voras User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hackers@freebsd.org X-Enigmail-Version: 0.83.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 25 Feb 2004 05:13:18 -0800 Subject: Screensaver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2004 22:52:39 -0000 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 ??? )""""""" `..-.,' """"""""""""" |"| .--' `--.