diff options
author | paulo <paul@bayleaf.org.uk> | 2010-01-13 17:56:10 +0000 |
---|---|---|
committer | paulo <paul@bayleaf.org.uk> | 2010-01-13 17:56:10 +0000 |
commit | 02e1b449d58345380db15b716391c20db55ed2d6 (patch) | |
tree | 0294e587a5fa352465c2cfb01f745b41ea40aac3 /bgpd/bgp_main.c | |
parent | ff5b1c237fd67969ae5317763294bfbecaf655d0 (diff) | |
download | quagga-02e1b449d58345380db15b716391c20db55ed2d6.tar.bz2 quagga-02e1b449d58345380db15b716391c20db55ed2d6.tar.xz |
Knitting it all together. Still not got clean compile. Still lots of
TODOs.
Diffstat (limited to 'bgpd/bgp_main.c')
-rw-r--r-- | bgpd/bgp_main.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 003b9df0..c53aaba2 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -346,7 +346,25 @@ bgp_exit (int status) qexit (status); } - + +/* threaded command*/ +DEFUN_HID_CALL (threaded, + threaded_cmd, + "threaded", + "Use pthreads\n") +{ + if (!qpthreads_enabled) + init_second_stage(1); + + return CMD_SUCCESS; +} + +static void +init_second_stage(int pthreads) +{ + qlib_init_second_stage(pthreads); + bgp_peer_index_mutex_init(NULL); +} /* Main routine of bgpd. Treatment of argument and start bgp finite state machine is handled at here. */ int @@ -549,21 +567,4 @@ main (int argc, char **argv) return (0); } -/* threaded */ -DEFUN_HID_CALL (threaded, - threaded_cmd, - "threaded", - "Use pthreads\n") -{ - if (!qpthreads_enabled) - init_second_stage(1); - return CMD_SUCCESS; -} - -static void -init_second_stage(int pthreads) -{ - qlib_init_second_stage(pthreads); - bgp_peer_index_mutex_init(NULL); -} |