On Thursday 19 January 2006 20:43, Jeff Dike wrote: > On Thu, Jan 19, 2006 at 04:01:28PM +0100, Blaisorblade wrote: > > Gerd Knorr in his tty patch, instead, used forward declarations, like: > > > > struct task_struct; > > > > what about that?
> I don't think so. At least when you use void *, you are using a type > that's not incorrect. In userspace code, those task_structs start > referring to host task_structs, which is definitely very wrong. Possibly yes, but as long as we don't dereference the pointer (and in a prototype you're not going to do that) there's no problem. Using a type makes the code clearer, and it doesn't hide any warning GCC may give (behaving well is left to us only). In fact, btw (before I forget) we have currently the wrong errno used in sys-i386/ldt.c. Just wrote the fix (it's adding a silly os_ptrace_ldt). Going to compile and send. > > Those functions probably should be moved anyway because they're > > useless there > Yeah. > Jeff -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
