Path: utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: mboyer@ireq-robot.hydro.qc.ca (Martin Boyer) Newsgroups: comp.sys.sun Subject: Optimization level and event handlers in SunView 1 Keywords: Windows Message-ID: <477@brchh104.bnr.ca> Date: 27 Nov 90 20:32:29 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 25 Approved: Sun-Spots@rice.edu X-Original-Date: Sat, 17 Nov 90 11:22:16 EST X-Sun-Spots-Digest: Volume 9, Issue 382, message 3 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu The SunOS 4.0.3 man page for cc(1) says: "Neither -O3 nor -O4 should be used when compiling either device drivers, or programs that modify external variables from within signal handlers." Do event handlers, such as those set by the WIN_EVENT_PROC window attribute, qualify as signal handlers? I suppose that deep down in window_main_loop() (in notify_dispatch(), probably), there is a call to select() checking for activity on the window descriptors. It is quite possible that no signal handler is required to do that. SIGWINCH-related events, however, are another matter; the handlers for CANVAS_REPAINT_PROC and CANVAS_RESIZE_PROC *might* be called from within a signal handler *or* might set an external variable that the notifier loop detects to issue the relevant events (WIN_REPAINT and WIN_RESIZE). Accordingly, can the O3 and O4 optimization levels be used on programs linked with the SunView library? Thanks, Martin Boyer mboyer@ireq-robot.hydro.qc.ca Institut de recherche d'Hydro-Quebec mboyer@ireq-robot.uucp Varennes, QC, Canada J3X 1S1 +1 514 652-8136