- File:
-
- 1 edited
-
libcfa/src/concurrency/clib/cfathread.cfa (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/clib/cfathread.cfa
ra0a949c r95dab9e 16 16 // #define EPOLL_FOR_SOCKETS 17 17 18 #include <string.h>19 20 18 #include "fstream.hfa" 21 19 #include "locks.hfa" … … 25 23 #include "time.hfa" 26 24 #include "stdlib.hfa" 27 #include "iofwd.hfa" 25 28 26 #include "cfathread.h" 27 28 extern "C" { 29 #include <string.h> 30 #include <errno.h> 31 } 29 32 30 33 extern void ?{}(processor &, const char[], cluster &, thread$ *); 31 34 extern "C" { 32 extern void __cfactx_invoke_thread(void (*main)(void *), void * this); 35 extern void __cfactx_invoke_thread(void (*main)(void *), void * this); 36 extern int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags); 33 37 } 34 38 … … 435 439 // Mutex 436 440 struct cfathread_mutex { 437 exp_backoff_then_block_lock impl;441 linear_backoff_then_block_lock impl; 438 442 }; 439 443 int cfathread_mutex_init(cfathread_mutex_t *restrict mut, const cfathread_mutexattr_t *restrict) __attribute__((nonnull (1))) { *mut = new(); return 0; } … … 450 454 // Condition 451 455 struct cfathread_condition { 452 condition_variable( exp_backoff_then_block_lock) impl;456 condition_variable(linear_backoff_then_block_lock) impl; 453 457 }; 454 458 int cfathread_cond_init(cfathread_cond_t *restrict cond, const cfathread_condattr_t *restrict) __attribute__((nonnull (1))) { *cond = new(); return 0; } … … 468 472 } 469 473 474 #include <iofwd.hfa> 475 470 476 extern "C" { 477 #include <unistd.h> 478 #include <sys/types.h> 479 #include <sys/socket.h> 480 471 481 //-------------------- 472 482 // IO operations … … 478 488 , protocol); 479 489 } 480 int cfathread_bind(int socket, __CONST_SOCKADDR_ARGaddress, socklen_t address_len) {490 int cfathread_bind(int socket, const struct sockaddr *address, socklen_t address_len) { 481 491 return bind(socket, address, address_len); 482 492 } … … 486 496 } 487 497 488 int cfathread_accept(int socket, __SOCKADDR_ARGaddress, socklen_t *restrict address_len) {498 int cfathread_accept(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len) { 489 499 #if defined(EPOLL_FOR_SOCKETS) 490 500 int ret; … … 503 513 } 504 514 505 int cfathread_connect(int socket, __CONST_SOCKADDR_ARGaddress, socklen_t address_len) {515 int cfathread_connect(int socket, const struct sockaddr *address, socklen_t address_len) { 506 516 #if defined(EPOLL_FOR_SOCKETS) 507 517 int ret;
Note:
See TracChangeset
for help on using the changeset viewer.