Changeset bed78cb in mainline for uspace/srv/net/tcp/rqueue.c


Ignore:
Timestamp:
2012-05-10T07:28:31Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
81a7858
Parents:
5b26747 (diff), fce7b43 (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.
Message:

Merge with mainline

File:
1 edited

Legend:

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

    r5b26747 rbed78cb  
    3939#include <io/log.h>
    4040#include <stdlib.h>
    41 #include <thread.h>
     41#include <fibril.h>
    4242#include "conn.h"
    4343#include "pdu.h"
     
    128128}
    129129
    130 /** Receive queue handler thread. */
    131 static void tcp_rqueue_thread(void *arg)
     130/** Receive queue handler fibril. */
     131static int tcp_rqueue_fibril(void *arg)
    132132{
    133133        link_t *link;
    134134        tcp_rqueue_entry_t *rqe;
    135135
    136         log_msg(LVL_DEBUG, "tcp_rqueue_thread()");
     136        log_msg(LVL_DEBUG, "tcp_rqueue_fibril()");
    137137
    138138        while (true) {
     
    142142                tcp_as_segment_arrived(&rqe->sp, rqe->seg);
    143143        }
     144
     145        /* Not reached */
     146        return 0;
    144147}
    145148
    146 /** Start receive queue handler thread. */
    147 void tcp_rqueue_thread_start(void)
     149/** Start receive queue handler fibril. */
     150void tcp_rqueue_fibril_start(void)
    148151{
    149         thread_id_t tid;
    150         int rc;
     152        fid_t fid;
    151153
    152         log_msg(LVL_DEBUG, "tcp_rqueue_thread_start()");
     154        log_msg(LVL_DEBUG, "tcp_rqueue_fibril_start()");
    153155
    154         rc = thread_create(tcp_rqueue_thread, NULL, "rqueue", &tid);
    155         if (rc != EOK) {
    156                 log_msg(LVL_ERROR, "Failed creating rqueue thread.");
     156        fid = fibril_create(tcp_rqueue_fibril, NULL);
     157        if (fid == 0) {
     158                log_msg(LVL_ERROR, "Failed creating rqueue fibril.");
    157159                return;
    158160        }
     161
     162        fibril_add_ready(fid);
    159163}
    160164
Note: See TracChangeset for help on using the changeset viewer.