Nitpicking: small correction to the "Creating a Portable User API" chapter
    Alexey Neyman 
    alex.neyman at auriga.ru
       
    Sun Jul  4 07:06:33 PDT 2004
    
    
  
Hello,
a small correction to the example code in the "userapi" chapter on your site: 
the read() function shall not update the [per-thread] errno value if it is 
successful. That is, the example code better looked like below. And I am not 
sure about the necessity to set msg->result to -1 in case of errors 
(shouldn't it be returned from the kernel just as in the case of successful 
read?):
	error = lwkt_domsg(&syscall_port, msg);
	if (error) {
		curthread->td_errno = error;
		msg->result = -1;
	}
	return(msg->result);
Regards,
Alexey.
-- 
Yes.  We have good news!
Well, that is to say, we have no news.
                        -- Pkunks, SC2
    
    
More information about the Bugs
mailing list