set_errno: only if there is a tf
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 9 Jun 2010 20:59:46 +0000 (13:59 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:35:48 +0000 (17:35 -0700)
commite8ffd2e991aa3049e5a1472fa098b91c2b8ef260
tree398564d12043f85c0f745247449b779e2c11dda6
parent0c63e7c72e4c2acdc5d2eb03eac2f5fa32118d6e
set_errno: only if there is a tf

Some paths (like async calls) might not have a current_tf when they call
set_errno.  Eventually, we'll need a way to propagate the errors back,
and perhaps current_tf isn't the right way.  For now, this will avoid
null ptr dereferences while keeping the calling code clean.
kern/arch/i686/trap.h
kern/arch/sparc/trap.h