DragonFly bugs List (threaded) for 2004-07
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Nitpicking: small correction to the "Creating a Portable User API" chapter
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
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]