Changeset a1f3d93
- Timestamp:
- Nov 29, 2021, 12:52:14 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 8da377d3
- Parents:
- c7b2215 (diff), 0351e9f (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. - Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
rc7b2215 ra1f3d93 502 502 } 503 503 504 bool __kernel_read(processor * proc, io_future_t & future, char buf[], int fd) { 505 $io_context * ctx = proc->io.ctx; 506 /* paranoid */ verify( ! __preemption_enabled() ); 507 /* paranoid */ verify( proc == __cfaabi_tls.this_processor ); 508 /* paranoid */ verify( ctx ); 509 510 __u32 idx; 511 struct io_uring_sqe * sqe; 512 513 // We can proceed to the fast path 514 if( !__alloc(ctx, &idx, 1) ) return false; 515 516 // Allocation was successful 517 __fill( &sqe, 1, &idx, ctx ); 518 519 sqe->opcode = IORING_OP_READ; 520 sqe->user_data = (uintptr_t)&future; 521 sqe->flags = 0; 522 sqe->ioprio = 0; 523 sqe->fd = fd; 524 sqe->off = 0; 525 sqe->fsync_flags = 0; 526 sqe->__pad2[0] = 0; 527 sqe->__pad2[1] = 0; 528 sqe->__pad2[2] = 0; 529 sqe->addr = (uintptr_t)buf; 530 sqe->len = sizeof(uint64_t); 531 532 asm volatile("": : :"memory"); 533 534 /* paranoid */ verify( sqe->user_data == (uintptr_t)&future ); 535 __submit( ctx, &idx, 1, true ); 536 537 /* paranoid */ verify( proc == __cfaabi_tls.this_processor ); 538 /* paranoid */ verify( ! __preemption_enabled() ); 539 } 504 #if defined(IO_URING_IDLE) 505 bool __kernel_read(processor * proc, io_future_t & future, char buf[], int fd) { 506 $io_context * ctx = proc->io.ctx; 507 /* paranoid */ verify( ! __preemption_enabled() ); 508 /* paranoid */ verify( proc == __cfaabi_tls.this_processor ); 509 /* paranoid */ verify( ctx ); 510 511 __u32 idx; 512 struct io_uring_sqe * sqe; 513 514 // We can proceed to the fast path 515 if( !__alloc(ctx, &idx, 1) ) return false; 516 517 // Allocation was successful 518 __fill( &sqe, 1, &idx, ctx ); 519 520 sqe->opcode = IORING_OP_READ; 521 sqe->user_data = (uintptr_t)&future; 522 sqe->flags = 0; 523 sqe->ioprio = 0; 524 sqe->fd = fd; 525 sqe->off = 0; 526 sqe->fsync_flags = 0; 527 sqe->__pad2[0] = 0; 528 sqe->__pad2[1] = 0; 529 sqe->__pad2[2] = 0; 530 sqe->addr = (uintptr_t)buf; 531 sqe->len = sizeof(uint64_t); 532 533 asm volatile("": : :"memory"); 534 535 /* paranoid */ verify( sqe->user_data == (uintptr_t)&future ); 536 __submit( ctx, &idx, 1, true ); 537 538 /* paranoid */ verify( proc == __cfaabi_tls.this_processor ); 539 /* paranoid */ verify( ! __preemption_enabled() ); 540 } 541 #endif 540 542 #endif -
libcfa/src/concurrency/kernel.cfa
rc7b2215 ra1f3d93 135 135 static inline bool __maybe_io_drain( processor * ); 136 136 137 extern bool __kernel_read(processor * proc, io_future_t & future, char buf[], int fd); 137 #if defined(IO_URING_IDLE) && defined(CFA_HAVE_LINUX_IO_URING_H) 138 extern bool __kernel_read(processor * proc, io_future_t & future, char buf[], int fd); 139 #endif 138 140 139 141 extern void __disable_interrupts_hard(); -
src/AST/Decl.hpp
rc7b2215 ra1f3d93 270 270 : AggregateDecl( loc, name, std::move(attrs), linkage ), kind( kind ) {} 271 271 272 bool is_coroutine() { return kind == Coroutine; }273 bool is_generator() { return kind == Generator; }274 bool is_monitor () { return kind == Monitor ; }275 bool is_thread () { return kind == Thread ; }272 bool is_coroutine() const { return kind == Coroutine; } 273 bool is_generator() const { return kind == Generator; } 274 bool is_monitor () const { return kind == Monitor ; } 275 bool is_thread () const { return kind == Thread ; } 276 276 277 277 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } -
src/AST/Print.cpp
rc7b2215 ra1f3d93 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Print.cpp -- 7 // Print.cpp -- Print an AST (or sub-tree) to a stream. 8 8 // 9 9 // Author : Thierry Delisle -
src/AST/Print.hpp
rc7b2215 ra1f3d93 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // Print.hpp -- 7 // Print.hpp -- Print an AST (or sub-tree) to a stream. 8 8 // 9 9 // Author : Thierry Delisle … … 35 35 template< typename Coll > 36 36 void printAll( std::ostream & os, const Coll & c, Indenter indent = {} ) { 37 38 39 40 41 42 43 37 for ( const auto & i : c ) { 38 if ( ! i ) continue; 39 40 os << indent; 41 print( os, i, indent ); 42 os << std::endl; 43 } 44 44 } 45 45 -
src/Concurrency/Keywords.cc
rc7b2215 ra1f3d93 979 979 // If this is the destructor for a monitor it must be mutex 980 980 if(isDtor) { 981 // This reflects MutexKeyword::validate, except does not produce an error. 981 982 Type* ty = decl->get_functionType()->get_parameters().front()->get_type(); 982 983 -
src/InitTweak/InitTweak.cc
rc7b2215 ra1f3d93 9 9 // Author : Rob Schluntz 10 10 // Created On : Fri May 13 11:26:36 2016 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Wed Jun 16 20:57:22202113 // Update Count : 1 811 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Nov 19 19:22:00 2021 13 // Update Count : 19 14 14 // 15 15 … … 540 540 } 541 541 542 const ast::Type * getTypeofThis( const ast::FunctionType * ftype ) { 543 assertf( ftype, "getTypeofThis: nullptr ftype" ); 544 const std::vector<ast::ptr<ast::Type>> & params = ftype->params; 545 assertf( !params.empty(), "getTypeofThis: ftype with 0 parameters: %s", 546 toString( ftype ).c_str() ); 547 const ast::ReferenceType * refType = 548 params.front().strict_as<ast::ReferenceType>(); 549 return refType->base; 550 } 551 542 552 ObjectDecl * getParamThis( FunctionType * ftype ) { 543 553 assertf( ftype, "getParamThis: nullptr ftype" ); -
src/InitTweak/InitTweak.h
rc7b2215 ra1f3d93 10 10 // Created On : Fri May 13 11:26:36 2016 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Jul 19 14:18:00 201913 // Update Count : 612 // Last Modified On : Fri Nov 19 14:18:00 2021 13 // Update Count : 7 14 14 // 15 15 … … 35 35 /// returns the base type of the first parameter to a constructor/destructor/assignment function 36 36 Type * getTypeofThis( FunctionType * ftype ); 37 const ast::Type * getTypeofThis( const ast::FunctionType * ftype ); 37 38 38 39 /// returns the first parameter of a constructor/destructor/assignment function
Note: See TracChangeset
for help on using the changeset viewer.