]> git.kernelconcepts.de Git - karo-tx-redboot.git/blobdiff - packages/net/ppp/v2_0/src/sys-ecos.c
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / packages / net / ppp / v2_0 / src / sys-ecos.c
index c01dc9a758d7d132ae8f3221dc8b28916bec1d0c..600740a89d281c95fb63c90a695d6b445c4da2f9 100644 (file)
@@ -558,7 +558,7 @@ static void cyg_ppp_tx_thread(CYG_ADDRWORD arg)
 
     // Wait for the PPPD thread to get going and start the PPP
     // initialization phase.
-    while(phase == PHASE_DEAD )
+    while(phase == PHASE_DEAD)
         cyg_thread_delay(100);
 
     // Now loop until the link goes back down.
@@ -1702,6 +1702,8 @@ externC cyg_ppp_handle_t cyg_ppp_up( const char *devnam_arg,
 
     ppp_tty.options = options;
 
+    cyg_semaphore_init( &ppp_tty.tx_sem,  0 );
+
     // Start the PPPD thread
     cyg_thread_create(CYGNUM_PPP_PPPD_THREAD_PRIORITY,
                       cyg_pppd_main,
@@ -1715,8 +1717,6 @@ externC cyg_ppp_handle_t cyg_ppp_up( const char *devnam_arg,
     cyg_thread_resume(ppp_tty.pppd_thread);
 
     // Start the TX thread
-    cyg_semaphore_init( &ppp_tty.tx_sem,  0 );
-    
     cyg_thread_create(CYGNUM_PPP_PPPD_THREAD_PRIORITY+1,
                       cyg_ppp_tx_thread,
                       (CYG_ADDRWORD)&ppp_tty,
@@ -1730,7 +1730,7 @@ externC cyg_ppp_handle_t cyg_ppp_up( const char *devnam_arg,
 
     // Wait for the PPPD thread to get going and start the PPP
     // initialization phase.
-    while(phase == PHASE_DEAD )
+    while(phase == PHASE_DEAD)
         cyg_thread_delay(100);
     
     return (cyg_ppp_handle_t)&ppp_tty;
@@ -1845,20 +1845,6 @@ void syslog( int level, char *fmt, ... )
 
 //=====================================================================
 
-int gettimeofday(struct timeval *tv, struct timezone *tz)
-{
-    cyg_tick_count_t time = cyg_current_time();
-    
-    tv->tv_sec = time/CYGNUM_HAL_RTC_DENOMINATOR;
-    tv->tv_usec = (time%CYGNUM_HAL_RTC_DENOMINATOR)*10000;
-    
-//    db_printf("%s: %d %d\n", __PRETTY_FUNCTION__, tv->tv_sec, tv->tv_usec);
-
-    return 0;
-}
-
-//=====================================================================
-
 char *crypt (const char *key, const char *salt)
 {
     static char res[13];