4600-project-1/main.cpp

22 lines
608 B
C++
Raw Normal View History

#include <cstdint>
#include <cstdio>
#include "list.hpp"
#define N 0x8
// Create all of memory
block memory[N] = {0};
// create the three lists
list freelist = {0}, list1 = {0}, list2 = {0};
int main (int argc, char* argv[]) {
// initialize the freelist
list_init(&freelist, memory, N);
// print the freelist
list_print(&freelist);
2022-04-03 16:52:30 +00:00
//TODO: Create producer, transformer, and consumer
//TODO: Create POSIX shared memory, and put memory, freelist, list1, list2 in it
//TODO: Use pthreads to split execution
//TODO: Implement a semaphore solution to the problem
}