Changes in uspace/srv/net/tcp/test.c [88a6819:69a93df7] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/test.c
r88a6819 r69a93df7 38 38 #include <errno.h> 39 39 #include <stdio.h> 40 #include < fibril.h>40 #include <thread.h> 41 41 #include <str.h> 42 42 #include "tcp_type.h" … … 47 47 #define RCV_BUF_SIZE 64 48 48 49 static inttest_srv(void *arg)49 static void test_srv(void *arg) 50 50 { 51 51 tcp_conn_t *conn; … … 84 84 85 85 printf("test_srv() terminating\n"); 86 return 0;87 86 } 88 87 89 static inttest_cli(void *arg)88 static void test_cli(void *arg) 90 89 { 91 90 tcp_conn_t *conn; … … 113 112 printf("C: User close...\n"); 114 113 tcp_uc_close(conn); 115 116 return 0;117 114 } 118 115 119 116 void tcp_test(void) 120 117 { 121 fid_t srv_fid; 122 fid_t cli_fid; 118 thread_id_t srv_tid; 119 thread_id_t cli_tid; 120 int rc; 123 121 124 122 printf("tcp_test()\n"); … … 127 125 128 126 if (0) { 129 srv_fid = fibril_create(test_srv, NULL);130 if ( srv_fid == 0) {131 printf("Failed to create server fibril.\n");127 rc = thread_create(test_srv, NULL, "test_srv", &srv_tid); 128 if (rc != EOK) { 129 printf("Failed to create server thread.\n"); 132 130 return; 133 131 } 134 135 fibril_add_ready(srv_fid);136 132 } 137 133 138 134 if (0) { 139 cli_fid = fibril_create(test_cli, NULL);140 if ( cli_fid == 0) {141 printf("Failed to create client fibril.\n");135 rc = thread_create(test_cli, NULL, "test_cli", &cli_tid); 136 if (rc != EOK) { 137 printf("Failed to create client thread.\n"); 142 138 return; 143 139 } 144 145 fibril_add_ready(cli_fid);146 140 } 147 141 }
Note:
See TracChangeset
for help on using the changeset viewer.