net.c (2d8ad8719591fa803b0d589ed057fa46f49b7155) | net.c (9df3b7eb6ec1c7734482f782bf8335a2737c02f0) |
---|---|
1/* 2 * net/tipc/net.c: TIPC network routing code 3 * 4 * Copyright (c) 1995-2006, Ericsson AB | 1/* 2 * net/tipc/net.c: TIPC network routing code 3 * 4 * Copyright (c) 1995-2006, Ericsson AB |
5 * Copyright (c) 2005, Wind River Systems | 5 * Copyright (c) 2005, 2010-2011, Wind River Systems |
6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions are met: 10 * 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright --- 96 unchanged lines hidden (view full) --- 110DEFINE_RWLOCK(tipc_net_lock); 111struct network tipc_net; 112 113static int net_start(void) 114{ 115 tipc_net.nodes = kcalloc(tipc_max_nodes + 1, 116 sizeof(*tipc_net.nodes), GFP_ATOMIC); 117 tipc_net.highest_node = 0; | 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions are met: 10 * 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright --- 96 unchanged lines hidden (view full) --- 110DEFINE_RWLOCK(tipc_net_lock); 111struct network tipc_net; 112 113static int net_start(void) 114{ 115 tipc_net.nodes = kcalloc(tipc_max_nodes + 1, 116 sizeof(*tipc_net.nodes), GFP_ATOMIC); 117 tipc_net.highest_node = 0; |
118 atomic_set(&tipc_net.links, 0); |
|
118 119 return tipc_net.nodes ? 0 : -ENOMEM; 120} 121 122static void net_stop(void) 123{ 124 u32 n_num; 125 --- 123 unchanged lines hidden --- | 119 120 return tipc_net.nodes ? 0 : -ENOMEM; 121} 122 123static void net_stop(void) 124{ 125 u32 n_num; 126 --- 123 unchanged lines hidden --- |