Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tcp/ncsim.c

    r88a6819 r69a93df7  
    4444#include <io/log.h>
    4545#include <stdlib.h>
    46 #include <fibril.h>
     46#include <thread.h>
    4747#include "conn.h"
    4848#include "ncsim.h"
     
    119119}
    120120
    121 /** Network condition simulator handler fibril. */
    122 static int tcp_ncsim_fibril(void *arg)
     121/** Network condition simulator handler thread. */
     122static void tcp_ncsim_thread(void *arg)
    123123{
    124124        link_t *link;
     
    126126        int rc;
    127127
    128         log_msg(LVL_DEBUG, "tcp_ncsim_fibril()");
     128        log_msg(LVL_DEBUG, "tcp_ncsim_thread()");
    129129
    130130
     
    151151                free(sqe);
    152152        }
    153 
    154         /* Not reached */
    155         return 0;
    156153}
    157154
    158 /** Start simulator handler fibril. */
    159 void tcp_ncsim_fibril_start(void)
     155/** Start simulator handler thread. */
     156void tcp_ncsim_thread_start(void)
    160157{
    161         fid_t fid;
     158        thread_id_t tid;
     159        int rc;
    162160
    163         log_msg(LVL_DEBUG, "tcp_ncsim_fibril_start()");
     161        log_msg(LVL_DEBUG, "tcp_ncsim_thread_start()");
    164162
    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.");
    168166                return;
    169167        }
    170 
    171         fibril_add_ready(fid);
    172168}
    173169
Note: See TracChangeset for help on using the changeset viewer.