lkml.org 
[lkml]   [2002]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Linux-streams] Re: [PATCH] Re: export of sys_call_tabl
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 ;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.024 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site