Changes in / [8d2d308f:8264867] in mainline
- Files:
-
- 6 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r8d2d308f r8264867 578 578 # USB settings 579 579 580 % USB release build (less logging)581 ! CONFIG_USB_ RELEASE_BUILD (y/n)580 % USB verbose messages 581 ! CONFIG_USB_VERBOSE (n/y) 582 582 583 583 % Start virtual USB host controller -
uspace/lib/usb/include/usb/debug.h
r8d2d308f r8264867 81 81 82 82 /** Default log level. */ 83 #ifdef CONFIG_USB_RELEASE_BUILD 83 #ifdef CONFIG_USB_VERBOSE 84 # define USB_LOG_LEVEL_DEFAULT USB_LOG_LEVEL_DEBUG 85 #else 84 86 # define USB_LOG_LEVEL_DEFAULT USB_LOG_LEVEL_INFO 85 #else86 # define USB_LOG_LEVEL_DEFAULT USB_LOG_LEVEL_DEBUG87 87 #endif 88 88 -
uspace/srv/net/tcp/ncsim.c
r8d2d308f r8264867 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 -
uspace/srv/net/tcp/ncsim.h
r8d2d308f r8264867 40 40 extern void tcp_ncsim_init(void); 41 41 extern void tcp_ncsim_bounce_seg(tcp_sockpair_t *, tcp_segment_t *); 42 extern void tcp_ncsim_thread_start(void); 43 42 extern void tcp_ncsim_fibril_start(void); 44 43 45 44 #endif -
uspace/srv/net/tcp/rqueue.c
r8d2d308f r8264867 39 39 #include <io/log.h> 40 40 #include <stdlib.h> 41 #include < thread.h>41 #include <fibril.h> 42 42 #include "conn.h" 43 43 #include "pdu.h" … … 128 128 } 129 129 130 /** Receive queue handler thread. */131 static void tcp_rqueue_thread(void *arg)130 /** Receive queue handler fibril. */ 131 static int tcp_rqueue_fibril(void *arg) 132 132 { 133 133 link_t *link; 134 134 tcp_rqueue_entry_t *rqe; 135 135 136 log_msg(LVL_DEBUG, "tcp_rqueue_ thread()");136 log_msg(LVL_DEBUG, "tcp_rqueue_fibril()"); 137 137 138 138 while (true) { … … 142 142 tcp_as_segment_arrived(&rqe->sp, rqe->seg); 143 143 } 144 145 /* Not reached */ 146 return 0; 144 147 } 145 148 146 /** Start receive queue handler thread. */147 void tcp_rqueue_ thread_start(void)149 /** Start receive queue handler fibril. */ 150 void tcp_rqueue_fibril_start(void) 148 151 { 149 thread_id_t tid; 150 int rc; 152 fid_t fid; 151 153 152 log_msg(LVL_DEBUG, "tcp_rqueue_ thread_start()");154 log_msg(LVL_DEBUG, "tcp_rqueue_fibril_start()"); 153 155 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."); 157 159 return; 158 160 } 161 162 fibril_add_ready(fid); 159 163 } 160 164 -
uspace/srv/net/tcp/rqueue.h
r8d2d308f r8264867 42 42 extern void tcp_rqueue_insert_seg(tcp_sockpair_t *, tcp_segment_t *); 43 43 extern void tcp_rqueue_handler(void *); 44 extern void tcp_rqueue_ thread_start(void);44 extern void tcp_rqueue_fibril_start(void); 45 45 46 46 -
uspace/srv/net/tcp/tcp.c
r8d2d308f r8264867 180 180 181 181 tcp_rqueue_init(); 182 tcp_rqueue_ thread_start();182 tcp_rqueue_fibril_start(); 183 183 184 184 tcp_ncsim_init(); 185 tcp_ncsim_ thread_start();185 tcp_ncsim_fibril_start(); 186 186 187 187 if (0) tcp_test(); -
uspace/srv/net/tcp/test.c
r8d2d308f r8264867 38 38 #include <errno.h> 39 39 #include <stdio.h> 40 #include < thread.h>40 #include <fibril.h> 41 41 #include <str.h> 42 42 #include "tcp_type.h" … … 47 47 #define RCV_BUF_SIZE 64 48 48 49 static voidtest_srv(void *arg)49 static int test_srv(void *arg) 50 50 { 51 51 tcp_conn_t *conn; … … 84 84 85 85 printf("test_srv() terminating\n"); 86 return 0; 86 87 } 87 88 88 static voidtest_cli(void *arg)89 static int test_cli(void *arg) 89 90 { 90 91 tcp_conn_t *conn; … … 112 113 printf("C: User close...\n"); 113 114 tcp_uc_close(conn); 115 116 return 0; 114 117 } 115 118 116 119 void tcp_test(void) 117 120 { 118 thread_id_t srv_tid; 119 thread_id_t cli_tid; 120 int rc; 121 fid_t srv_fid; 122 fid_t cli_fid; 121 123 122 124 printf("tcp_test()\n"); … … 125 127 126 128 if (0) { 127 rc = thread_create(test_srv, NULL, "test_srv", &srv_tid);128 if ( rc != EOK) {129 printf("Failed to create server thread.\n");129 srv_fid = fibril_create(test_srv, NULL); 130 if (srv_fid == 0) { 131 printf("Failed to create server fibril.\n"); 130 132 return; 131 133 } 134 135 fibril_add_ready(srv_fid); 132 136 } 133 137 134 138 if (0) { 135 rc = thread_create(test_cli, NULL, "test_cli", &cli_tid);136 if ( rc != EOK) {137 printf("Failed to create client thread.\n");139 cli_fid = fibril_create(test_cli, NULL); 140 if (cli_fid == 0) { 141 printf("Failed to create client fibril.\n"); 138 142 return; 139 143 } 144 145 fibril_add_ready(cli_fid); 140 146 } 141 147 }
Note:
See TracChangeset
for help on using the changeset viewer.