STABLE14-ubik-iter-proto-20041208

prototype, casts, and proper arg count for ubik_CallIter
thanks to Christof Hanke for some of this


(cherry picked from commit 867c3010731daa89f58e54c2c620215de0a94c1f)
This commit is contained in:
Jim Rees 2004-12-13 19:38:51 +00:00 committed by Derrick Brashear
parent 9b8470f57b
commit 033167f1a9
4 changed files with 20 additions and 31 deletions

View File

@ -512,10 +512,9 @@ ka_islocked(char *name, char *instance, afs_uint32 * when)
do {
tempwhen = 0;
code =
ubik_CallIter(KAM_LockStatus, conn, UPUBIKONLY, &count, name,
instance, &tempwhen, /*spares */ 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0);
ubik_CallIter(KAM_LockStatus, conn, UPUBIKONLY, &count, (long) name,
(long) instance, (long) &tempwhen, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
if (code) {
if (seriouserror(code))
com_err(whoami, code, "");
@ -550,8 +549,8 @@ Unlock(struct cmd_syndesc *as, char *arock)
count = 0;
do {
code = ubik_CallIter(KAM_Unlock, conn, 0, &count, name, instance,
/*spares */ 0, 0, 0, 0);
code = ubik_CallIter(KAM_Unlock, conn, 0, &count, (long) name, (long) instance,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
if (code && (code != UNOSERVERS)) {
server = 0;
if (conn && conn->conns[count - 1]

View File

@ -475,8 +475,10 @@ kawrap_ubik_Call(aproc, aclient, aflags, p1, p2, p3, p4, p5, p6, p7, p8)
do { /* Cycle through the servers */
lcode = code;
code =
ubik_CallIter(aproc, aclient, aflags, &count, p1, p2, p3, p4,
p5, p6, p7, p8, 0, 0, 0, 0, 0, 0, 0, 0);
ubik_CallIter(aproc, aclient, aflags, &count, (long) p1,
(long) p2, (long) p3, (long) p4,
(long) p5, (long) p6, (long) p7,
(long) p8, 0, 0, 0, 0, 0, 0, 0, 0);
} while ((code == UNOQUORUM) || (code == UNOTSYNC)
|| (code == KALOCKED) || (code == -1));

View File

@ -354,6 +354,12 @@ extern int ubik_ClientInit(register struct rx_connection **serverconns,
extern afs_int32 ubik_ClientDestroy(struct ubik_client *aclient);
extern afs_int32 ubik_CallIter(int (*aproc) (), struct ubik_client *aclient,
afs_int32 aflags, int *apos, long p1, long p2,
long p3, long p4, long p5, long p6, long p7,
long p8, long p9, long p10, long p11, long p12,
long p13, long p14, long p15, long p16);
/* ubik.c */
extern int ubik_BeginTrans(register struct ubik_dbase *dbase,
afs_int32 transMode, struct ubik_trans **transPtr);

View File

@ -46,7 +46,6 @@ RCSID
#endif /* defined(UKERNEL) */
afs_int32 ubik_CallIter();
short ubik_initializationState; /* initial state is zero */
@ -750,28 +749,11 @@ ubik_Call_New(aproc, aclient, aflags, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10,
* This is part of an iterator. It doesn't handle finding sync sites
*/
afs_int32
ubik_CallIter(aproc, aclient, aflags, apos, p1, p2, p3, p4, p5, p6, p7, p8,
p9, p10, p11, p12, p13, p14, p15, p16)
int (*aproc) ();
register struct ubik_client *aclient;
afs_int32 aflags;
int *apos;
long p1;
long p2;
long p3;
long p4;
long p5;
long p6;
long p7;
long p8;
long p9;
long p10;
long p11;
long p12;
long p13;
long p14;
long p15;
long p16;
ubik_CallIter(int (*aproc) (), struct ubik_client *aclient,
afs_int32 aflags, int *apos, long p1, long p2,
long p3, long p4, long p5, long p6, long p7,
long p8, long p9, long p10, long p11, long p12,
long p13, long p14, long p15, long p16)
{
return CallIter(aproc, aclient, aflags, apos, p1, p2, p3, p4, p5, p6, p7,
p8, p9, p10, p11, p12, p13, p14, p15, p16, NEED_LOCK);