Changes in / [d30e3eb:1633e04]
- Files:
-
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
rd30e3eb r1633e04 295 295 // make sure the target hasn't stopped existing since last time 296 296 HELP: if(target < ctxs_count) { 297 // calculate it's age and how young it could be before we give ip on helping297 // calculate it's age and how young it could be before we give up on helping 298 298 const __readyQ_avg_t cutoff = calc_cutoff(ctsc, ctx->cq.id, ctxs_count, io.data, io.tscs, __shard_factor.io, false); 299 299 const __readyQ_avg_t age = moving_average(ctsc, io.tscs[target].t.tv, io.tscs[target].t.ma, false); -
libcfa/src/concurrency/io/call.cfa.in
rd30e3eb r1633e04 89 89 #if defined(CFA_HAVE_PREADV2) 90 90 struct iovec; 91 extern ssize_t preadv2 (int fd, const struct iovec * iov, int iovcnt, off_t offset, int flags);91 extern ssize_t preadv2 (int fd, const struct iovec * iov, int iovcnt, off_t offset, int flags); 92 92 #endif 93 93 #if defined(CFA_HAVE_PWRITEV2) 94 94 struct iovec; 95 extern ssize_t pwritev2(int fd, const struct iovec * iov, int iovcnt, off_t offset, int flags);95 extern ssize_t pwritev2(int fd, const struct iovec * iov, int iovcnt, off_t offset, int flags); 96 96 #endif 97 97 … … 108 108 struct msghdr; 109 109 struct sockaddr; 110 extern ssize_t sendmsg(int sockfd, const struct msghdr * msg, int flags);111 extern ssize_t recvmsg(int sockfd, struct msghdr * msg, int flags);112 extern ssize_t send(int sockfd, const void * buf, size_t len, int flags);113 extern ssize_t recv(int sockfd, void * buf, size_t len, int flags);110 extern ssize_t sendmsg(int sockfd, const struct msghdr * msg, int flags); 111 extern ssize_t recvmsg(int sockfd, struct msghdr * msg, int flags); 112 extern ssize_t send(int sockfd, const void * buf, size_t len, int flags); 113 extern ssize_t recv(int sockfd, void * buf, size_t len, int flags); 114 114 115 115 extern int fallocate(int fd, int mode, off_t offset, off_t len); 116 116 extern int posix_fadvise(int fd, off_t offset, off_t len, int advice); 117 extern int madvise(void * addr, size_t length, int advice);118 119 extern int openat(int dirfd, const char * pathname, int flags, mode_t mode);117 extern int madvise(void * addr, size_t length, int advice); 118 119 extern int openat(int dirfd, const char * pathname, int flags, mode_t mode); 120 120 extern int close(int fd); 121 121 122 extern ssize_t read (int fd, void * buf, size_t count);122 extern ssize_t read (int fd, void * buf, size_t count); 123 123 124 124 struct epoll_event; 125 extern int epoll_ctl(int epfd, int op, int fd, struct epoll_event * event);126 127 extern ssize_t splice(int fd_in, __off64_t * off_in, int fd_out, __off64_t *off_out, size_t len, unsigned int flags);125 extern int epoll_ctl(int epfd, int op, int fd, struct epoll_event * event); 126 127 extern ssize_t splice(int fd_in, __off64_t * off_in, int fd_out, __off64_t * off_out, size_t len, unsigned int flags); 128 128 extern ssize_t tee(int fd_in, int fd_out, size_t len, unsigned int flags); 129 129 } … … 224 224 calls = [ 225 225 # CFA_HAVE_IORING_OP_READV 226 Call('READV', 'ssize_t preadv2(int fd, const struct iovec * iov, int iovcnt, off_t offset, int flags)', {226 Call('READV', 'ssize_t preadv2(int fd, const struct iovec * iov, int iovcnt, off_t offset, int flags)', { 227 227 'fd' : 'fd', 228 'addr': '(typeof(sqe->addr))iov', 229 'len' : 'iovcnt', 228 230 'off' : 'offset', 229 'addr': '(uintptr_t)iov', 230 'len' : 'iovcnt', 231 'rw_flags' : 'flags' 231 232 }, define = 'CFA_HAVE_PREADV2'), 232 233 # CFA_HAVE_IORING_OP_WRITEV 233 Call('WRITEV', 'ssize_t pwritev2(int fd, const struct iovec * iov, int iovcnt, off_t offset, int flags)', {234 Call('WRITEV', 'ssize_t pwritev2(int fd, const struct iovec * iov, int iovcnt, off_t offset, int flags)', { 234 235 'fd' : 'fd', 236 'addr': '(typeof(sqe->addr))iov', 237 'len' : 'iovcnt', 235 238 'off' : 'offset', 236 'addr': '(uintptr_t)iov', 237 'len' : 'iovcnt' 239 'rw_flags' : 'flags' 238 240 }, define = 'CFA_HAVE_PWRITEV2'), 239 241 # CFA_HAVE_IORING_OP_FSYNC … … 242 244 }), 243 245 # CFA_HAVE_IORING_OP_EPOLL_CTL 244 Call('EPOLL_CTL', 'int epoll_ctl(int epfd, int op, int fd, struct epoll_event * event)', {246 Call('EPOLL_CTL', 'int epoll_ctl(int epfd, int op, int fd, struct epoll_event * event)', { 245 247 'fd': 'epfd', 248 'len': 'op', 246 249 'addr': 'fd', 247 'len': 'op', 248 'off': '(uintptr_t)event' 250 'off': '(typeof(sqe->off))event' 249 251 }), 250 252 # CFA_HAVE_IORING_OP_SYNC_FILE_RANGE … … 256 258 }), 257 259 # CFA_HAVE_IORING_OP_SENDMSG 258 Call('SENDMSG', 'ssize_t sendmsg(int sockfd, const struct msghdr * msg, int flags)', {259 'fd': 'sockfd', 260 'addr': '( uintptr_t)(struct msghdr *)msg',260 Call('SENDMSG', 'ssize_t sendmsg(int sockfd, const struct msghdr * msg, int flags)', { 261 'fd': 'sockfd', 262 'addr': '(typeof(sqe->addr))(struct msghdr *)msg', 261 263 'len': '1', 262 264 'msg_flags': 'flags' 263 265 }), 264 266 # CFA_HAVE_IORING_OP_RECVMSG 265 Call('RECVMSG', 'ssize_t recvmsg(int sockfd, struct msghdr * msg, int flags)', {266 'fd': 'sockfd', 267 'addr': '( uintptr_t)(struct msghdr *)msg',267 Call('RECVMSG', 'ssize_t recvmsg(int sockfd, struct msghdr * msg, int flags)', { 268 'fd': 'sockfd', 269 'addr': '(typeof(sqe->addr))(struct msghdr *)msg', 268 270 'len': '1', 269 271 'msg_flags': 'flags' 270 272 }), 271 273 # CFA_HAVE_IORING_OP_SEND 272 Call('SEND', 'ssize_t send(int sockfd, const void * buf, size_t len, int flags)', {273 'fd': 'sockfd', 274 'addr': '( uintptr_t)buf',274 Call('SEND', 'ssize_t send(int sockfd, const void * buf, size_t len, int flags)', { 275 'fd': 'sockfd', 276 'addr': '(typeof(sqe->addr))buf', 275 277 'len': 'len', 276 278 'msg_flags': 'flags' 277 279 }), 278 280 # CFA_HAVE_IORING_OP_RECV 279 Call('RECV', 'ssize_t recv(int sockfd, void * buf, size_t len, int flags)', {280 'fd': 'sockfd', 281 'addr': '( uintptr_t)buf',281 Call('RECV', 'ssize_t recv(int sockfd, void * buf, size_t len, int flags)', { 282 'fd': 'sockfd', 283 'addr': '(typeof(sqe->addr))buf', 282 284 'len': 'len', 283 285 'msg_flags': 'flags' … … 286 288 Call('ACCEPT', 'int accept4(int sockfd, __SOCKADDR_ARG addr, socklen_t * restrict addrlen, int flags)', { 287 289 'fd': 'sockfd', 288 'addr': '( uintptr_t)&addr',289 'addr2': '( uintptr_t)addrlen',290 'addr': '(typeof(sqe->addr))&addr', 291 'addr2': '(typeof(sqe->addr2))addrlen', 290 292 'accept_flags': 'flags' 291 293 }), … … 293 295 Call('CONNECT', 'int connect(int sockfd, __CONST_SOCKADDR_ARG addr, socklen_t addrlen)', { 294 296 'fd': 'sockfd', 295 'addr': '( uintptr_t)&addr',297 'addr': '(typeof(sqe->addr))&addr', 296 298 'off': 'addrlen' 297 299 }), … … 299 301 Call('FALLOCATE', 'int fallocate(int fd, int mode, off_t offset, off_t len)', { 300 302 'fd': 'fd', 301 'addr': '(uintptr_t)len',302 303 'len': 'mode', 303 'off': 'offset' 304 'off': 'offset', 305 'addr': 'len' 304 306 }), 305 307 # CFA_HAVE_IORING_OP_FADVISE … … 311 313 }), 312 314 # CFA_HAVE_IORING_OP_MADVISE 313 Call('MADVISE', 'int madvise(void * addr, size_t length, int advice)', {314 'addr': '( uintptr_t)addr',315 Call('MADVISE', 'int madvise(void * addr, size_t length, int advice)', { 316 'addr': '(typeof(sqe->addr))addr', 315 317 'len': 'length', 316 318 'fadvise_advice': 'advice' 317 319 }), 318 320 # CFA_HAVE_IORING_OP_OPENAT 319 Call('OPENAT', 'int openat(int dirfd, const char * pathname, int flags, mode_t mode)', {321 Call('OPENAT', 'int openat(int dirfd, const char * pathname, int flags, mode_t mode)', { 320 322 'fd': 'dirfd', 321 'addr': '( uintptr_t)pathname',322 ' len': 'mode',323 ' open_flags': 'flags;'323 'addr': '(typeof(sqe->addr))pathname', 324 'open_flags': 'flags;', 325 'len': 'mode' 324 326 }), 325 327 # CFA_HAVE_IORING_OP_OPENAT2 326 Call('OPENAT2', 'int openat2(int dirfd, const char * pathname, struct open_how * how, size_t size)', {328 Call('OPENAT2', 'int openat2(int dirfd, const char * pathname, struct open_how * how, size_t size)', { 327 329 'fd': 'dirfd', 328 'addr': ' pathname',329 ' len': 'sizeof(*how)',330 ' off': '(uintptr_t)how',330 'addr': '(typeof(sqe->addr))pathname', 331 'off': '(typeof(sqe->off))how', 332 'len': 'sizeof(*how)' 331 333 }, define = 'CFA_HAVE_OPENAT2'), 332 334 # CFA_HAVE_IORING_OP_CLOSE … … 335 337 }), 336 338 # CFA_HAVE_IORING_OP_STATX 337 Call('STATX', 'int statx(int dirfd, const char * pathname, int flags, unsigned int mask, struct statx *statxbuf)', {339 Call('STATX', 'int statx(int dirfd, const char * pathname, int flags, unsigned int mask, struct statx * statxbuf)', { 338 340 'fd': 'dirfd', 339 ' off': '(uintptr_t)statxbuf',340 ' addr': 'pathname',341 'addr': '(typeof(sqe->addr))pathname', 342 'statx_flags': 'flags', 341 343 'len': 'mask', 342 ' statx_flags': 'flags'344 'off': '(typeof(sqe->off))statxbuf' 343 345 }, define = 'CFA_HAVE_STATX'), 344 346 # CFA_HAVE_IORING_OP_READ 345 347 Call('READ', 'ssize_t read(int fd, void * buf, size_t count)', { 346 348 'fd': 'fd', 347 'addr': '( uintptr_t)buf',349 'addr': '(typeof(sqe->addr))buf', 348 350 'len': 'count' 349 351 }), … … 351 353 Call('WRITE', 'ssize_t write(int fd, void * buf, size_t count)', { 352 354 'fd': 'fd', 353 'addr': '( uintptr_t)buf',355 'addr': '(typeof(sqe->addr))buf', 354 356 'len': 'count' 355 357 }), 356 358 # CFA_HAVE_IORING_OP_SPLICE 357 Call('SPLICE', 'ssize_t splice(int fd_in, __off64_t * off_in, int fd_out, __off64_t *off_out, size_t len, unsigned int flags)', {359 Call('SPLICE', 'ssize_t splice(int fd_in, __off64_t * off_in, int fd_out, __off64_t * off_out, size_t len, unsigned int flags)', { 358 360 'splice_fd_in': 'fd_in', 359 'splice_off_in': 'off_in ? ( __u64)*off_in : (__u64)-1',361 'splice_off_in': 'off_in ? (typeof(sqe->splice_off_in))*off_in : (typeof(sqe->splice_off_in))-1', 360 362 'fd': 'fd_out', 361 'off': 'off_out ? ( __u64)*off_out : (__u64)-1',363 'off': 'off_out ? (typeof(sqe->off))*off_out : (typeof(sqe->off))-1', 362 364 'len': 'len', 363 365 'splice_flags': 'flags' -
src/AST/Print.cpp
rd30e3eb r1633e04 369 369 --indent; 370 370 } 371 } 372 373 if ( ! node->withExprs.empty() ) { 374 // Not with a clause, but the 'with clause'. 375 ++indent; 376 os << " with clause" << endl << indent; 377 printAll( node->withExprs ); 378 --indent; 371 379 } 372 380 -
src/Common/module.mk
rd30e3eb r1633e04 20 20 Common/CodeLocationTools.hpp \ 21 21 Common/CodeLocationTools.cpp \ 22 Common/Debug.h \23 22 Common/DeclStats.hpp \ 24 23 Common/DeclStats.cpp \ -
src/Common/utility.h
rd30e3eb r1633e04 190 190 } 191 191 192 template< typename... Params >193 void warn( const Params & ... params ) {194 std::cerr << "Warning: ";195 toString_single( std::cerr, params... );196 std::cerr << std::endl;197 }198 199 192 // determines if pref is a prefix of str 200 193 static inline bool isPrefix( const std::string & str, const std::string & pref, unsigned int start = 0 ) { -
src/InitTweak/FixInit.cc
rd30e3eb r1633e04 1233 1233 } 1234 1234 1235 template< typename Visitor, typename... Params >1236 void error( Visitor & v, CodeLocation loc, const Params &... params ) {1237 SemanticErrorException err( loc, toString( params... ) );1238 v.errors.append( err );1239 }1240 1241 1235 template< typename... Params > 1242 1236 void GenStructMemberCalls::emit( CodeLocation loc, const Params &... params ) { 1243 // toggle warnings vs. errors here. 1244 // warn( params... ); 1245 error( *this, loc, params... ); 1237 SemanticErrorException err( loc, toString( params... ) ); 1238 errors.append( err ); 1246 1239 } 1247 1240 -
src/InitTweak/FixInitNew.cpp
rd30e3eb r1633e04 1303 1303 } 1304 1304 1305 template< typename Visitor, typename... Params >1306 void error( Visitor & v, CodeLocation loc, const Params &... params ) {1307 SemanticErrorException err( loc, toString( params... ) );1308 v.errors.append( err );1309 }1310 1311 1305 template< typename... Params > 1312 1306 void GenStructMemberCalls::emit( CodeLocation loc, const Params &... params ) { 1313 // toggle warnings vs. errors here. 1314 // warn( params... ); 1315 error( *this, loc, params... ); 1307 SemanticErrorException err( loc, toString( params... ) ); 1308 errors.append( err ); 1316 1309 } 1317 1310 -
src/Parser/parser.yy
rd30e3eb r1633e04 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 21 19:01:00202313 // Update Count : 599012 // Last Modified On : Wed Mar 22 21:26:01 2023 13 // Update Count : 6002 14 14 // 15 15 … … 270 270 SemanticError( yylloc, ::toString( "Identifier \"", identifier, "\" cannot appear before a ", kind, ".\n" 271 271 "Possible cause is misspelled storage/CV qualifier, misspelled typename, or missing generic parameter." ) ); 272 } // IdentifierBeforeType 273 274 static bool TypedefForall( DeclarationNode * decl ) { 275 if ( decl->type->forall || (decl->type->kind == TypeData::Aggregate && decl->type->aggregate.params) ) { 276 SemanticError( yylloc, "forall qualifier in typedef is currently unimplemented." ); 277 return true; 278 } // if 279 return false; 272 280 } // IdentifierBeforeType 273 281 … … 1958 1966 TYPEDEF type_specifier declarator 1959 1967 { 1960 // if type_specifier is an anon aggregate => name1961 1968 typedefTable.addToEnclosingScope( *$3->name, TYPEDEFname, "4" ); 1962 $$ = $3->addType( $2 )->addTypedef(); // watchout frees $2 and $3 1969 if ( TypedefForall( $2 ) ) $$ = nullptr; 1970 else $$ = $3->addType( $2 )->addTypedef(); // watchout frees $2 and $3 1963 1971 } 1964 1972 | typedef_declaration pop ',' push declarator … … 1970 1978 { 1971 1979 typedefTable.addToEnclosingScope( *$4->name, TYPEDEFname, "6" ); 1972 $$ = $4->addQualifiers( $1 )->addType( $3 )->addTypedef(); 1980 if ( TypedefForall( $1 ) ) $$ = nullptr; 1981 else $$ = $4->addQualifiers( $1 )->addType( $3 )->addTypedef(); 1973 1982 } 1974 1983 | type_specifier TYPEDEF declarator 1975 1984 { 1976 1985 typedefTable.addToEnclosingScope( *$3->name, TYPEDEFname, "7" ); 1977 $$ = $3->addType( $1 )->addTypedef(); 1986 if ( TypedefForall( $1 ) ) $$ = nullptr; 1987 else $$ = $3->addType( $1 )->addTypedef(); 1978 1988 } 1979 1989 | type_specifier TYPEDEF type_qualifier_list declarator 1980 1990 { 1981 1991 typedefTable.addToEnclosingScope( *$4->name, TYPEDEFname, "8" ); 1982 $$ = $4->addQualifiers( $1 )->addType( $1 )->addTypedef(); 1992 if ( TypedefForall( $3 ) ) $$ = nullptr; 1993 else $$ = $4->addQualifiers( $1 )->addType( $1 )->addTypedef(); 1983 1994 } 1984 1995 ; -
src/SynTree/FunctionDecl.cc
rd30e3eb r1633e04 87 87 } // if 88 88 89 if ( !withExprs.empty() ) { 90 os << indent << "... with clause" << std::endl; 91 os << indent + 1; 92 printAll( withExprs, os, indent + 1 ); 93 } 94 89 95 if ( statements ) { 90 96 os << indent << "... with body" << endl << indent+1;
Note: See TracChangeset
for help on using the changeset viewer.