mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
RX: Add rx_InterruptCall
Add rx_InterruptCall, to cause a call to error out and wakeup anyone
waiting to write or read to that call.
Reviewed-on: http://gerrit.openafs.org/2982
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 9fa496d11f
)
Change-Id: I2e0f5eb2942830523b19d2596c50d0fba0fc9a1a
Reviewed-on: http://gerrit.openafs.org/3248
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
f5f3f9106a
commit
608b568a89
@ -266,7 +266,7 @@ EXPORTS
|
||||
; rx_FreeStatistics @271
|
||||
rx_SetConnHardDeadTime @272
|
||||
rx_SetConnIdleDeadTime @273
|
||||
; rx_InterruptCall @274
|
||||
rx_InterruptCall @274
|
||||
osi_Panic @275
|
||||
|
||||
; lwp functions
|
||||
|
15
src/rx/rx.c
15
src/rx/rx.c
@ -4918,6 +4918,21 @@ rxi_ConnectionError(struct rx_connection *conn,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Interrupt an in-progress call with the specified error and wakeup waiters.
|
||||
*
|
||||
* @param[in] call The call to interrupt
|
||||
* @param[in] error The error code to send to the peer
|
||||
*/
|
||||
void
|
||||
rx_InterruptCall(struct rx_call *call, afs_int32 error)
|
||||
{
|
||||
MUTEX_ENTER(&call->lock);
|
||||
rxi_CallError(call, error);
|
||||
rxi_SendCallAbort(call, NULL, 0, 1);
|
||||
MUTEX_EXIT(&call->lock);
|
||||
}
|
||||
|
||||
void
|
||||
rxi_CallError(struct rx_call *call, afs_int32 error)
|
||||
{
|
||||
|
@ -81,6 +81,7 @@ extern void rx_SetArrivalProc(struct rx_call *call,
|
||||
int index),
|
||||
void * handle, int arg);
|
||||
extern afs_int32 rx_EndCall(struct rx_call *call, afs_int32 rc);
|
||||
extern void rx_InterruptCall(struct rx_call *call, afs_int32 error);
|
||||
extern void rx_Finalize(void);
|
||||
extern void rxi_PacketsUnWait(void);
|
||||
extern struct rx_service *rxi_FindService(osi_socket socket,
|
||||
|
@ -142,6 +142,7 @@
|
||||
afs_xdr_short;
|
||||
afs_xdr_string;
|
||||
afs_xdr_vector;
|
||||
rx_InterruptCall;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user