ar-internal.h (d3be4d244330f7ef53242d8dc1b7f77d105e767f) ar-internal.h (09d2bf595db4b4075ea721acd61e180d6bb18f88)
1/* AF_RXRPC internal definitions
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 967 unchanged lines hidden (view full) ---

976 * local_event.c
977 */
978extern void rxrpc_process_local_events(struct rxrpc_local *);
979
980/*
981 * local_object.c
982 */
983struct rxrpc_local *rxrpc_lookup_local(struct net *, const struct sockaddr_rxrpc *);
1/* AF_RXRPC internal definitions
2 *
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 967 unchanged lines hidden (view full) ---

976 * local_event.c
977 */
978extern void rxrpc_process_local_events(struct rxrpc_local *);
979
980/*
981 * local_object.c
982 */
983struct rxrpc_local *rxrpc_lookup_local(struct net *, const struct sockaddr_rxrpc *);
984void __rxrpc_put_local(struct rxrpc_local *);
984struct rxrpc_local *rxrpc_get_local(struct rxrpc_local *);
985struct rxrpc_local *rxrpc_get_local_maybe(struct rxrpc_local *);
986void rxrpc_put_local(struct rxrpc_local *);
987void rxrpc_queue_local(struct rxrpc_local *);
985void rxrpc_destroy_all_locals(struct rxrpc_net *);
986
988void rxrpc_destroy_all_locals(struct rxrpc_net *);
989
987static inline void rxrpc_get_local(struct rxrpc_local *local)
988{
989 atomic_inc(&local->usage);
990}
991
992static inline
993struct rxrpc_local *rxrpc_get_local_maybe(struct rxrpc_local *local)
994{
995 return atomic_inc_not_zero(&local->usage) ? local : NULL;
996}
997
998static inline void rxrpc_put_local(struct rxrpc_local *local)
999{
1000 if (local && atomic_dec_and_test(&local->usage))
1001 __rxrpc_put_local(local);
1002}
1003
1004static inline void rxrpc_queue_local(struct rxrpc_local *local)
1005{
1006 rxrpc_queue_work(&local->processor);
1007}
1008
1009/*
1010 * misc.c
1011 */
1012extern unsigned int rxrpc_max_backlog __read_mostly;
1013extern unsigned long rxrpc_requested_ack_delay;
1014extern unsigned long rxrpc_soft_ack_delay;
1015extern unsigned long rxrpc_idle_ack_delay;
1016extern unsigned int rxrpc_rx_window_size;

--- 274 unchanged lines hidden ---
990/*
991 * misc.c
992 */
993extern unsigned int rxrpc_max_backlog __read_mostly;
994extern unsigned long rxrpc_requested_ack_delay;
995extern unsigned long rxrpc_soft_ack_delay;
996extern unsigned long rxrpc_idle_ack_delay;
997extern unsigned int rxrpc_rx_window_size;

--- 274 unchanged lines hidden ---