4600-project-1/main.cpp
2022-04-03 11:52:30 -05:00

22 lines
608 B
C++

#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);
//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
}