Ignore:
Timestamp:
Feb 21, 2023, 4:24:34 PM (3 years ago)
Author:
caparson <caparson@…>
Branches:
ADT, ast-experimental, master, stuck-waitfor-destruct
Children:
257a8f5, ce44c5f
Parents:
1180175 (diff), 9a533ba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
libcfa/src/concurrency/clib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/clib/cfathread.cfa

    r1180175 r640b3df  
    1616// #define EPOLL_FOR_SOCKETS
    1717
     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
    1822#include "fstream.hfa"
    1923#include "locks.hfa"
     
    2630#include "cfathread.h"
    2731
    28 extern "C" {
    29                 #include <string.h>
    30                 #include <errno.h>
    31 }
    32 
    3332extern void ?{}(processor &, const char[], cluster &, thread$ *);
    3433extern "C" {
    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);
     34        extern void __cfactx_invoke_thread(void (*main)(void *), void * this);
    3735}
    3836
     
    472470}
    473471
     472#include <unistd.h>
     473
    474474#include <iofwd.hfa>
    475475
    476476extern "C" {
    477         #include <unistd.h>
    478         #include <sys/types.h>
    479         #include <sys/socket.h>
    480 
    481477        //--------------------
    482478        // IO operations
     
    488484                , protocol);
    489485        }
    490         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) {
    491487                return bind(socket, address, address_len);
    492488        }
     
    496492        }
    497493
    498         int cfathread_accept(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len) {
     494        int cfathread_accept(int socket, __SOCKADDR_ARG address, socklen_t *restrict address_len) {
    499495                #if defined(EPOLL_FOR_SOCKETS)
    500496                        int ret;
     
    513509        }
    514510
    515         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) {
    516512                #if defined(EPOLL_FOR_SOCKETS)
    517513                        int ret;
  • libcfa/src/concurrency/clib/cfathread.h

    r1180175 r640b3df  
    99// Author           : Thierry Delisle
    1010// 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
    1414//
    1515
    1616#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
    1721extern "C" {
    1822#endif
    19         #include <asm/types.h>
    20         #include <errno.h>
    21         #include <unistd.h>
    22 
    23 
    2423        //--------------------
    2524        // Basic types
     
    7372        } cfathread_mutexattr_t;
    7473        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)));
    7675        int cfathread_mutex_destroy(cfathread_mutex_t *mut) __attribute__((nonnull (1)));
    7776        int cfathread_mutex_lock(cfathread_mutex_t *mut) __attribute__((nonnull (1)));
     
    9190        //--------------------
    9291        // IO operations
    93         struct sockaddr;
    94         struct msghdr;
    9592        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);
    9794        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);
    10097        int cfathread_dup(int fildes);
    10198        int cfathread_close(int fildes);
Note: See TracChangeset for help on using the changeset viewer.