Changeset b0d0285 for libcfa


Ignore:
Timestamp:
Mar 2, 2022, 6:48:30 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
bf8b77e
Parents:
496f92ed
Message:

kernel now aborts if a ring is closed with unsubmitted entries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/io/setup.cfa

    r496f92ed rb0d0285  
    5656
    5757        #include "bitmanip.hfa"
     58        #include "fstream.hfa"
    5859        #include "kernel_private.hfa"
    5960        #include "thread.hfa"
     
    258259                struct __sub_ring_t & sq = this.sq;
    259260                struct __cmp_ring_t & cq = this.cq;
     261                {
     262                        __u32 fhead = sq.free_ring.head;
     263                        __u32 ftail = sq.free_ring.tail;
     264
     265                        __u32 total = *sq.num;
     266                        __u32 avail = ftail - fhead;
     267
     268                        if(avail != total) abort | "Processor (" | (void*)this.proc | ") tearing down ring with" | (total - avail) | "entries allocated but not submitted, out of" | total;
     269                }
    260270
    261271                // unmap the submit queue entries
Note: See TracChangeset for help on using the changeset viewer.