Initial Commit
This commit is contained in:
commit
e4debd05db
14
Makefile
Normal file
14
Makefile
Normal 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
BIN
bin/driver.out
Executable file
Binary file not shown.
BIN
build/consumer.o
Normal file
BIN
build/consumer.o
Normal file
Binary file not shown.
BIN
build/driver.o
Normal file
BIN
build/driver.o
Normal file
Binary file not shown.
BIN
build/producer.o
Normal file
BIN
build/producer.o
Normal file
Binary file not shown.
0
include/consumer.h
Normal file
0
include/consumer.h
Normal file
0
include/producer.h
Normal file
0
include/producer.h
Normal file
4
src/consumer.c
Normal file
4
src/consumer.c
Normal file
@ -0,0 +1,4 @@
|
||||
void consumer(void)
|
||||
{
|
||||
;
|
||||
}
|
19
src/driver.c
Normal file
19
src/driver.c
Normal 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
4
src/producer.c
Normal file
@ -0,0 +1,4 @@
|
||||
void producer(void)
|
||||
{
|
||||
;
|
||||
}
|
Loading…
Reference in New Issue
Block a user