1*cf84ac9aSAndroid Build Coastguard Worker #include "negated_errno.h" 2*cf84ac9aSAndroid Build Coastguard Worker 3*cf84ac9aSAndroid Build Coastguard Worker static void get_error(struct tcb * tcp,const bool check_errno)4*cf84ac9aSAndroid Build Coastguard Workerget_error(struct tcb *tcp, const bool check_errno) 5*cf84ac9aSAndroid Build Coastguard Worker { 6*cf84ac9aSAndroid Build Coastguard Worker if (check_errno && is_negated_errno(avr32_regs.r12)) { 7*cf84ac9aSAndroid Build Coastguard Worker tcp->u_rval = -1; 8*cf84ac9aSAndroid Build Coastguard Worker tcp->u_error = -avr32_regs.r12; 9*cf84ac9aSAndroid Build Coastguard Worker } else { 10*cf84ac9aSAndroid Build Coastguard Worker tcp->u_rval = avr32_regs.r12; 11*cf84ac9aSAndroid Build Coastguard Worker } 12*cf84ac9aSAndroid Build Coastguard Worker } 13