summaryrefslogtreecommitdiffstats
path: root/fs/bfs
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2010-08-13 16:37:00 -0400
committerChris Metcalf <cmetcalf@tilera.com>2010-08-13 16:37:00 -0400
commitba00376b0b13f234d839541a7b36a5bf5c2a4036 (patch)
tree9f74c7d7933d969484859365f055b5a77cfc4fd1 /fs/bfs
parentc745a8a11fa1df6078bfc61fc29492ed43f71c2b (diff)
downloadop-kernel-dev-ba00376b0b13f234d839541a7b36a5bf5c2a4036.zip
op-kernel-dev-ba00376b0b13f234d839541a7b36a5bf5c2a4036.tar.gz
arch/tile: extend syscall ABI to set r1 on return as well.
Until now, the tile architecture ABI for syscall return has just been that r0 holds the return value, and an error is only signalled like it is for kernel code, with a negative small number. However, this means that in multiple places in userspace we end up writing the same three-cycle idiom that tests for a small negative number for error. It seems cleaner to instead move that code into the kernel, and set r1 to hold zero on success or errno on failure; previously, r1 was just zeroed on return from the kernel (to avoid leaking kernel state). This way a single conditional branch after the syscall is sufficient to test for the failure case. The number of cycles taken is the same, but the error-checking code is in just one place, so total code size is smaller, and random userspace syscall code is easier to understand. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'fs/bfs')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud