Grand Reindent

Run the Ganesha reindenture script over the src and tirpc
directories.

The indent program had some issues with src/netnamer.c.  The
file hasn't been compiled recently, so ignore this.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Checkpatch baseline.

Resolve checkpatch warings in src and tirpc.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
s/tirpc/ntirpc.

Permit ntirpc headers to co-exist with legacy tirpc headers.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix standalone build.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Remove obselete VERSION file.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add libc_private.h for standalone fbsd build

Signed-off-by: Viji Ganapathi <vganapathi@panasas.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Change gating condition for likely/unlikely definitions

Currently, likely and unlikely defines are gated by __GLIBC__.
This define isn't a problem until building within nfs-ganesha as
nfs-ganesha uses (__GNUC__ >= 3).
Therefore, change tirpc to use the same gating define as nfs-ganesha.
Signed-off-by: Viji Ganapathi <vganapathi@panasas.com>

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Omit check for SVC_XPRT_FLAG_DESTROYED in SVC_REF.

If SVC_REF cannot fail, the number of call sites which
much check for transport errors is reduced.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix RPC_TIMEDOUT handling in clnt_dg_call.

It is incorrect to "timeout" without attempting to send.  Always
give poll a chance to find data (which we must do to avoid an
effective deadlock in the presence of timeouts).

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix segfault during shutdown.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Take write locks in rpc_dplx_shutdown().

To avoid deadlock, callers must have removed ALL registrations
before calling svc_shutdown().

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Handle timeout on duplex call

Previously, clnt_vc_call wasn't returning RPC_TIMEDOUT on duplex calls
that timed out.

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Use realtime clock for cond_timedwait timeouts

This should get rid of some of the spurious timeouts. For improved
performance we use CLOCK_REALTIME_FAST (which is defined to
CLOCK_REALTIME_COARSE on Linux.)

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Serialize gss_wrap/gss_unwrap.

A small degree of unserialization could be achieved by moving
the critical section into the wrap/unwrap routines in authgss_prot.c,
but the potential gain looks small.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>