Changeset d786dea9 in mainline for uspace/srv/net/tcp/tcp_type.h


Ignore:
Timestamp:
2012-05-11T09:44:14Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9094c0f
Parents:
fce7b43
Message:

Use a receive fibril in TCP socket provider to make reception non-blocking. This is more of a hack, the whole code needs to be revamped.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tcp/tcp_type.h

    rfce7b43 rd786dea9  
    3939#include <async.h>
    4040#include <bool.h>
     41#include <fibril.h>
    4142#include <fibril_synch.h>
    4243#include <socket_core.h>
     
    331332} tcp_client_t;
    332333
     334#define TCP_SOCK_FRAGMENT_SIZE 1024
     335
    333336typedef struct tcp_sockdata {
    334337        /** Lock */
     
    348351        /** List of connections (from lconn) that are ready to be accepted */
    349352        list_t ready;
     353        /** Receiving fibril */
     354        fid_t recv_fibril;
     355        uint8_t recv_buffer[TCP_SOCK_FRAGMENT_SIZE];
     356        size_t recv_buffer_used;
     357        fibril_mutex_t recv_buffer_lock;
     358        fibril_condvar_t recv_buffer_cv;
     359        tcp_error_t recv_error;
    350360} tcp_sockdata_t;
    351361
Note: See TracChangeset for help on using the changeset viewer.