Changeset f5f2768 for libcfa/src/concurrency/clib
- Timestamp:
- Feb 16, 2023, 4:37:25 PM (18 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- fbdfcd8
- Parents:
- 1c80f20
- git-author:
- Peter A. Buhr <pabuhr@…> (02/16/23 16:34:37)
- git-committer:
- Peter A. Buhr <pabuhr@…> (02/16/23 16:37:25)
- Location:
- libcfa/src/concurrency/clib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/clib/cfathread.cfa
r1c80f20 rf5f2768 16 16 // #define EPOLL_FOR_SOCKETS 17 17 18 #include <sys/socket.h> // first include because of anonymous types __SOCKADDR_ARG, __CONST_SOCKADDR_ARG 19 #include <string.h> 20 #include <errno.h> 21 18 22 #include "fstream.hfa" 19 23 #include "locks.hfa" … … 25 29 26 30 #include "cfathread.h" 27 28 extern "C" {29 #include <string.h>30 #include <errno.h>31 }32 31 33 32 extern void ?{}(processor &, const char[], cluster &, thread$ *); … … 471 470 } 472 471 472 #include <unistd.h> 473 473 474 #include <iofwd.hfa> 474 475 475 476 extern "C" { 476 #include <unistd.h>477 #include <sys/types.h>478 #include <sys/socket.h>479 480 477 //-------------------- 481 478 // IO operations … … 487 484 , protocol); 488 485 } 489 int cfathread_bind(int socket, const struct sockaddr *address, socklen_t address_len) {486 int cfathread_bind(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len) { 490 487 return bind(socket, address, address_len); 491 488 } … … 495 492 } 496 493 497 int cfathread_accept(int socket, struct sockaddr *restrictaddress, socklen_t *restrict address_len) {494 int cfathread_accept(int socket, __SOCKADDR_ARG address, socklen_t *restrict address_len) { 498 495 #if defined(EPOLL_FOR_SOCKETS) 499 496 int ret; … … 512 509 } 513 510 514 int cfathread_connect(int socket, const struct sockaddr *address, socklen_t address_len) {511 int cfathread_connect(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len) { 515 512 #if defined(EPOLL_FOR_SOCKETS) 516 513 int ret; -
libcfa/src/concurrency/clib/cfathread.h
r1c80f20 rf5f2768 9 9 // Author : Thierry Delisle 10 10 // Created On : Tue Sep 22 15:31:20 2020 11 // Last Modified By : 12 // Last Modified On : 13 // Update Count : 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 16 12:00:32 2023 13 // Update Count : 5 14 14 // 15 15 16 16 #if defined(__cforall) || defined(__cplusplus) 17 #include <sys/socket.h> // first include because of anonymous types __SOCKADDR_ARG, __CONST_SOCKADDR_ARG 18 #include <unistd.h> 19 #include <errno.h> 20 17 21 extern "C" { 18 22 #endif 19 #include <asm/types.h>20 #include <errno.h>21 #include <unistd.h>22 23 24 23 //-------------------- 25 24 // Basic types … … 73 72 } cfathread_mutexattr_t; 74 73 typedef struct cfathread_mutex * cfathread_mutex_t; 75 int cfathread_mutex_init(cfathread_mutex_t * restrict mut, const cfathread_mutexattr_t *restrict attr) __attribute__((nonnull (1)));74 int cfathread_mutex_init(cfathread_mutex_t * restrict mut, const cfathread_mutexattr_t * restrict attr) __attribute__((nonnull (1))); 76 75 int cfathread_mutex_destroy(cfathread_mutex_t *mut) __attribute__((nonnull (1))); 77 76 int cfathread_mutex_lock(cfathread_mutex_t *mut) __attribute__((nonnull (1))); … … 91 90 //-------------------- 92 91 // IO operations 93 struct sockaddr;94 struct msghdr;95 92 int cfathread_socket(int domain, int type, int protocol); 96 int cfathread_bind(int socket, const struct sockaddr *address, socklen_t address_len);93 int cfathread_bind(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len); 97 94 int cfathread_listen(int socket, int backlog); 98 int cfathread_accept(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len);99 int cfathread_connect(int socket, const struct sockaddr *address, socklen_t address_len);95 int cfathread_accept(int socket, __SOCKADDR_ARG address, socklen_t * restrict address_len); 96 int cfathread_connect(int socket, __CONST_SOCKADDR_ARG address, socklen_t address_len); 100 97 int cfathread_dup(int fildes); 101 98 int cfathread_close(int fildes);
Note: See TracChangeset
for help on using the changeset viewer.