Changeset e6a78b9 in mainline for uspace/srv/net/tcp/ncsim.c
- Timestamp:
- 2012-06-29T15:31:44Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9432f08
- Parents:
- 34ab31c0 (diff), 0bbd13e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/ncsim.c
r34ab31c0 re6a78b9 44 44 #include <io/log.h> 45 45 #include <stdlib.h> 46 #include < thread.h>46 #include <fibril.h> 47 47 #include "conn.h" 48 48 #include "ncsim.h" … … 119 119 } 120 120 121 /** Network condition simulator handler thread. */122 static void tcp_ncsim_thread(void *arg)121 /** Network condition simulator handler fibril. */ 122 static int tcp_ncsim_fibril(void *arg) 123 123 { 124 124 link_t *link; … … 126 126 int rc; 127 127 128 log_msg(LVL_DEBUG, "tcp_ncsim_ thread()");128 log_msg(LVL_DEBUG, "tcp_ncsim_fibril()"); 129 129 130 130 … … 151 151 free(sqe); 152 152 } 153 154 /* Not reached */ 155 return 0; 153 156 } 154 157 155 /** Start simulator handler thread. */156 void tcp_ncsim_ thread_start(void)158 /** Start simulator handler fibril. */ 159 void tcp_ncsim_fibril_start(void) 157 160 { 158 thread_id_t tid; 159 int rc; 161 fid_t fid; 160 162 161 log_msg(LVL_DEBUG, "tcp_ncsim_ thread_start()");163 log_msg(LVL_DEBUG, "tcp_ncsim_fibril_start()"); 162 164 163 rc = thread_create(tcp_ncsim_thread, NULL, "ncsim", &tid);164 if ( rc != EOK) {165 log_msg(LVL_ERROR, "Failed creating ncsim thread.");165 fid = fibril_create(tcp_ncsim_fibril, NULL); 166 if (fid == 0) { 167 log_msg(LVL_ERROR, "Failed creating ncsim fibril."); 166 168 return; 167 169 } 170 171 fibril_add_ready(fid); 168 172 } 169 173
Note:
See TracChangeset
for help on using the changeset viewer.