Initial Commit

This commit is contained in:
TriantaTV 2022-10-11 19:50:07 -05:00
commit e4debd05db
10 changed files with 41 additions and 0 deletions

14
Makefile Normal file
View File

@ -0,0 +1,14 @@
INC := -I include
all: compile exec
compile:
gcc $(INC) -c -o build/driver.o src/driver.c
gcc $(INC) -c -o build/producer.o src/producer.c
gcc $(INC) -c -o build/consumer.o src/consumer.c
exec:
./driver.out
clean:
rm driver.out consumer.out producer.out

BIN
bin/driver.out Executable file

Binary file not shown.

BIN
build/consumer.o Normal file

Binary file not shown.

BIN
build/driver.o Normal file

Binary file not shown.

BIN
build/producer.o Normal file

Binary file not shown.

0
include/consumer.h Normal file
View File

0
include/producer.h Normal file
View File

4
src/consumer.c Normal file
View File

@ -0,0 +1,4 @@
void consumer(void)
{
;
}

19
src/driver.c Normal file
View File

@ -0,0 +1,19 @@
#include <stdio.h>
#include <unistd.h>
int GetSplitAmount(char* argv);
int main(int argc, char* argv[])
{
int splitLimit = 1;
if (argc == 2)
splitLimit = GetSplitAmount(argv[1]);
}
int GetSplitAmount(char* argv)
{
int splitAmount;
sscanf(argv, "%d", &splitAmount);
return splitAmount;
}

4
src/producer.c Normal file
View File

@ -0,0 +1,4 @@
void producer(void)
{
;
}