• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/lib/devif/backends/debug/

Lines Matching defs:region

32  * Each chunk specifies a offset within the region and its length.
34 * When a region is registered, we add one memory chunk that describes
35 * the whole region i.e. offset=0 length= length of region
48 * We might fail to find the region id in our list of regions. In this
49 * case we add the region with the deqeued offset+length as a size.
50 * We can be sure that this region exists since the devq library itself
51 * does these checks if the region is known to the endpoint. This simply
55 * When a region is deregistered, the list of chunks has to only
56 * contain a single chunk that descirbes the whole region. Otherwise
71 // is a region that we did not register ourselves
95 static void dump_list(struct memory_list* region)
97 struct memory_ele* ele = region->buffers;
116 static void check_consistency(struct memory_list* region)
118 struct memory_ele* ele = region->buffers;
122 dump_list(region);
150 static bool in_list(struct memory_list* region, genoffset_t offset,
153 struct memory_ele* ele = region->buffers;
255 // i.e. the whole region
266 DEBUG("removed region rid=%"PRIu32" size=%"PRIu64" \n", rid,
298 DEBUG("removed region rid=%"PRIu32" size=%"PRIu64" \n", rid,
352 struct memory_list* region,
364 // check if buffer at beginning of region
376 region->buffers = buffer->next;
393 // check if buffer at end of region
460 struct memory_list* region,
466 assert(region != NULL);
614 region->buffers = ele;
633 // find region
634 struct memory_list* region = que->regions;
636 while (region != NULL) {
637 if (region->rid == rid) {
640 region = region->next;
643 // check if we found the region
644 if (region == NULL) {
648 *list = region;
662 // find region
663 struct memory_list* region = NULL;
665 err = find_region(que, &region, rid);
670 check_consistency(region);
673 struct memory_ele* buffer = region->buffers;
675 if (region->buffers == NULL) {
689 remove_split_buffer(que, region, buffer, offset, length);
696 dump_list(region);
712 remove_split_buffer(que, region, buffer, offset, length);
718 printf("Did not find region offset=%ld length=%ld \n", offset, length);
720 dump_list(region);
739 struct memory_list* region = NULL;
741 err = find_region(que, &region, *rid);
743 // region ids are checked bythe devq library, if we do not find
744 // the region id when dequeueing here we do not have a consistant
747 // Add region
749 printf("Adding region frirst %lu len \n", *offset + *length);
756 // region is at least offset + length
775 printf("Adding region second %lu len \n", *offset + *length);
798 if (region->not_consistent) {
799 if ((*offset + *length) > region->length) {
800 region->length = *offset + *length;
804 //check_consistency(region);
807 struct memory_ele* buffer = region->buffers;
809 region->buffers = slab_alloc(&que->alloc);
810 assert(region->buffers != NULL);
812 region->buffers->offset = *offset;
813 region->buffers->length = *length;
814 region->buffers->next = NULL;
815 region->buffers->prev = NULL;
822 insert_merge_buffer(que, region, buffer, *offset, *length);
836 insert_merge_buffer(que, region, buffer, *offset, *length);
847 insert_merge_buffer(que, region, buffer, *offset, *length);
898 // find region
899 struct memory_list* region = NULL;
901 err = find_region(que, &region, rid);
906 dump_list(region);