Skip site navigation (1)Skip section navigation (2)
Date:      21 Jan 2001 20:15:26 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Adrian Chadd <adrian@FreeBSD.ORG>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: linux_connect() is broken
Message-ID:  <xzpn1ck4sz5.fsf@flood.ping.uio.no>
In-Reply-To: Adrian Chadd's message of "Sun, 21 Jan 2001 19:00:07 %2B0100"
References:  <20010121190007.A39518@roaming.cacheboy.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Adrian Chadd <adrian@FreeBSD.ORG> writes:
> * inside a syscall, if I return (value); what happens?

errno gets set to that value, and if it's non-zero, the userland
syscall code returns -1 to the caller.

> * inside a syscall, if I set p->p_retval[0] to something, and then
>   return (value); what happens ?

If the value you return is non-zero, see above. If it's zero, the
userland syscall code returns p->p_retval[0] to the caller.

> * Does this logic also apply to the Linux syscall stuff in the kernel?

I think so. Marcel would be better placed to answer that.

DES
-- 
Dag-Erling Smorgrav - des@ofug.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpn1ck4sz5.fsf>