Skip to contentSkip to conversation

export of sys_call_tabl

PATCH David Grothe 1 participant 1 message Oct 10, 2002

lore
Share & tools
lore
#0 lore raw

Previous patch was "better" but not correct. How about this? (changed return 0 to return ret).

int register_streams_calls(int (*putpmsg) (int, void *, void *, int, int),

                            int (*getpmsg) (int, void *, void *, int, int))
{
        int ret = 0;
        down_write(&streams_call_sem) ; /* should return int, but doesn't */
        if (   (putpmsg != NULL && do_putpmsg != NULL)
            || (getpmsg != NULL && do_getpmsg != NULL)
           )
                ret = -EBUSY;
        else {
                do_putpmsg = putpmsg;
                do_getpmsg = getpmsg;
        }
        up_write(&streams_call_sem);
        return ret ;
}