Changes in uspace/srv/net/tcp/ncsim.c [88a6819:69a93df7] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/ncsim.c
r88a6819 r69a93df7 44 44 #include <io/log.h> 45 45 #include <stdlib.h> 46 #include < fibril.h>46 #include <thread.h> 47 47 #include "conn.h" 48 48 #include "ncsim.h" … … 119 119 } 120 120 121 /** Network condition simulator handler fibril. */122 static int tcp_ncsim_fibril(void *arg)121 /** Network condition simulator handler thread. */ 122 static void tcp_ncsim_thread(void *arg) 123 123 { 124 124 link_t *link; … … 126 126 int rc; 127 127 128 log_msg(LVL_DEBUG, "tcp_ncsim_ fibril()");128 log_msg(LVL_DEBUG, "tcp_ncsim_thread()"); 129 129 130 130 … … 151 151 free(sqe); 152 152 } 153 154 /* Not reached */155 return 0;156 153 } 157 154 158 /** Start simulator handler fibril. */159 void tcp_ncsim_ fibril_start(void)155 /** Start simulator handler thread. */ 156 void tcp_ncsim_thread_start(void) 160 157 { 161 fid_t fid; 158 thread_id_t tid; 159 int rc; 162 160 163 log_msg(LVL_DEBUG, "tcp_ncsim_ fibril_start()");161 log_msg(LVL_DEBUG, "tcp_ncsim_thread_start()"); 164 162 165 fid = fibril_create(tcp_ncsim_fibril, NULL);166 if ( fid == 0) {167 log_msg(LVL_ERROR, "Failed creating ncsim fibril.");163 rc = thread_create(tcp_ncsim_thread, NULL, "ncsim", &tid); 164 if (rc != EOK) { 165 log_msg(LVL_ERROR, "Failed creating ncsim thread."); 168 166 return; 169 167 } 170 171 fibril_add_ready(fid);172 168 } 173 169
Note:
See TracChangeset
for help on using the changeset viewer.