浏览代码

- ticks_t move in timer_ticks.h
- tcpconn_get() exported (tls needs it)

Andrei Pelinescu-Onciul 19 年之前
父节点
当前提交
ef9e3860f1
共有 3 个文件被更改,包括 6 次插入3 次删除
  1. 3 1
      tcp_conn.h
  2. 1 2
      timer.h
  3. 2 0
      timer_ticks.h

+ 3 - 1
tcp_conn.h

@@ -41,7 +41,7 @@
 #include "ip_addr.h"
 #include "locking.h"
 #include "atomic_ops.h"
-
+#include "timer_ticks.h"
 
 #define TCP_CON_MAX_ALIASES 4 /* maximum number of port aliases */
 
@@ -198,6 +198,8 @@ static inline unsigned tcp_addr_hash(struct ip_addr* ip, unsigned short port)
 
 #define tcp_id_hash(id) (id&(TCP_ID_HASH_SIZE-1))
 
+struct tcp_connection* tcpconn_get(int id, struct ip_addr* ip, int port,
+									ticks_t timeout);
 
 #endif
 

+ 1 - 2
timer.h

@@ -43,6 +43,7 @@
 
 #include "clist.h"
 #include "dprint.h"
+#include "timer_ticks.h"
 
 #ifdef USE_SLOW_TIMER
 #include <sys/types.h>
@@ -51,8 +52,6 @@ typedef unsigned short slow_idx_t; /* type fot the slow index */
 extern pid_t slow_timer_pid;
 #endif
 
-typedef unsigned int ticks_t;/* type used to keep the ticks (must be 32 bits)*/
-typedef signed   int s_ticks_t; /* signed ticks type */
 
 
 

+ 2 - 0
timer_ticks.h

@@ -54,5 +54,7 @@
 #define TICKS_TO_MS(t) (((t)*1000U)/TIMER_TICKS_HZ)
 
 
+typedef unsigned int ticks_t;/* type used to keep the ticks (must be 32 bits)*/
+typedef signed   int s_ticks_t; /* signed ticks type */
 
 #endif