- Timestamp:
- Jul 29, 2020, 11:29:01 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 0c760db
- Parents:
- 1d17939
- Location:
- libcfa/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/locks.hfa
r1d17939 rb81fd95 130 130 pthread_mutex_init(&lock, &mattr); 131 131 132 pthread_cond_init (&cond, 0p);132 pthread_cond_init (&cond, (const pthread_condattr_t *)0p); // workaround trac#208: cast should not be required 133 133 val = 0; 134 134 } -
libcfa/src/concurrency/kernel.cfa
r1d17939 rb81fd95 1075 1075 1076 1076 void kernel_abort_msg( void * kernel_data, char * abort_text, int abort_text_size ) { 1077 $thread * thrd = kernel_data;1077 $thread * thrd = ( $thread * ) kernel_data; 1078 1078 1079 1079 if(thrd) { -
libcfa/src/concurrency/preemption.cfa
r1d17939 rb81fd95 481 481 sigset_t oldset; 482 482 int ret; 483 ret = pthread_sigmask(0, 0p, &oldset);483 ret = pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset); // workaround trac#208: cast should be unnecessary 484 484 if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); } 485 485 -
libcfa/src/containers/list.hfa
r1d17939 rb81fd95 22 22 \ 23 23 static inline NODE& $tempcv_e2n(ELEM &node) { \ 24 return node; \24 return ( NODE & ) node; \ 25 25 } \ 26 26 \ … … 187 187 $next_link(singleton_to_insert) = $next_link(list_pos); 188 188 if ($next_link(list_pos).is_terminator) { 189 dlist(Tnode, Telem) *list = $next_link(list_pos).terminator;189 dlist(Tnode, Telem) *list = ( dlist(Tnode, Telem) * ) $next_link(list_pos).terminator; 190 190 $dlinks(Telem) *list_links = & list->$links; 191 191 $mgd_link(Telem) *list_last = & list_links->prev; … … 210 210 $prev_link(singleton_to_insert) = $prev_link(list_pos); 211 211 if ($prev_link(list_pos).is_terminator) { 212 dlist(Tnode, Telem) *list = $prev_link(list_pos).terminator;212 dlist(Tnode, Telem) *list = ( dlist(Tnode, Telem) * ) $prev_link(list_pos).terminator; 213 213 $dlinks(Telem) *list_links = & list->$links; 214 214 $mgd_link(Telem) *list_first = & list_links->next; … … 275 275 276 276 if ( $prev_link(list_pos).is_terminator ) { 277 dlist(Tnode, Telem) * tgt_before = $prev_link(list_pos).terminator;277 dlist(Tnode, Telem) * tgt_before = ( dlist(Tnode, Telem) * ) $prev_link(list_pos).terminator; 278 278 $dlinks(Telem) * links_before = & tgt_before->$links; 279 279 &incoming_from_prev = & links_before->next; … … 285 285 286 286 if ( $next_link(list_pos).is_terminator ) { 287 dlist(Tnode, Telem) * tgt_after = $next_link(list_pos).terminator;287 dlist(Tnode, Telem) * tgt_after = ( dlist(Tnode, Telem) * ) $next_link(list_pos).terminator; 288 288 $dlinks(Telem) * links_after = & tgt_after->$links; 289 289 &incoming_from_next = & links_after->prev; -
libcfa/src/iostream.hfa
r1d17939 rb81fd95 363 363 _Istream_Cstr excl( const char scanset[], char * s ) { return (_Istream_Cstr){ s, scanset, -1, { .flags.inex : true } }; } 364 364 _Istream_Cstr & excl( const char scanset[], _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = true; return fmt; } 365 _Istream_Cstr ignore( c onst char s[] ) { return (_Istream_Cstr)@{ s, 0p, -1, { .flags.ignore : true } }; }365 _Istream_Cstr ignore( char s[] ) { return (_Istream_Cstr)@{ s, 0p, -1, { .flags.ignore : true } }; } 366 366 _Istream_Cstr & ignore( _Istream_Cstr & fmt ) { fmt.flags.ignore = true; return fmt; } 367 367 _Istream_Cstr wdi( unsigned int w, char s[] ) { return (_Istream_Cstr)@{ s, 0p, w, { .all : 0 } }; } -
libcfa/src/stdlib.hfa
r1d17939 rb81fd95 232 232 size_t osize = malloc_size( ptr ); // current allocation 233 233 size_t nsize = dim * sizeof(T); // new allocation 234 T * nptr = realloc( ptr, align, nsize ); // CFA realloc234 T * nptr = alloc_align( ptr, align, nsize ); // CFA alloc_align 235 235 if ( nsize > osize ) { // larger ? 236 236 memset( (char *)nptr + osize, (int)fill, nsize - osize ); // initialize added storage … … 243 243 size_t nsize = dim * sizeof(T); // new allocation 244 244 size_t ndim = nsize / sizeof(T); // new dimension 245 T * nptr = realloc( ptr, align, nsize ); // CFA realloc245 T * nptr = alloc_align( ptr, align, nsize ); // CFA alloc_align 246 246 if ( ndim > odim ) { // larger ? 247 247 for ( i; odim ~ ndim ) {
Note: See TracChangeset
for help on using the changeset viewer.