Skip to content
This repository was archived by the owner on Jun 1, 2019. It is now read-only.

Commit 47d076e

Browse files
committed
Transfer project from Epitech repository
1 parent d6a8ca6 commit 47d076e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3841
-0
lines changed

Assets/Fonts/Oxygen.otf

48.9 KB
Binary file not shown.

Libs/Bin/Concurrency/CCRY/all.hpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// all.hpp for all in /home/jsx/Epitech/tek2/C++2/plazza/cpp_plazza/Srcs/Objects/Concurrency/CCRY/
3+
//
4+
// Made by jsx
5+
6+
//
7+
// Started on Mon Apr 17 18:08:02 2017 jsx
8+
// Last update Thu Apr 20 17:25:36 2017 jsx
9+
//
10+
11+
#ifndef CCRY_ALL_HPP_
12+
#define CCRY_ALL_HPP_
13+
14+
#include "process.hpp"
15+
#include "lock.hpp"
16+
#include "threads.hpp"
17+
#include "event.hpp"
18+
#include "communication.hpp"
19+
20+
#endif /* end of include guard: CCRY_ALL_HPP_ */
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//
2+
// Created by julien on 20/04/17.
3+
//
4+
5+
#ifndef RENDU_COMMUNICATION_HPP
6+
#define RENDU_COMMUNICATION_HPP
7+
8+
#include "./Includes/WritePipe.hpp"
9+
#include "./Includes/ReadPipe.hpp"
10+
11+
#endif //RENDU_COMMUNICATION_HPP

Libs/Bin/Concurrency/CCRY/event.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// event.hpp for event in /home/jsx/Epitech/tek2/C++2/plazza/cpp_plazza/Libs/Bin/Concurrency/CCRY/
3+
//
4+
// Made by jsx
5+
6+
//
7+
// Started on Thu Apr 20 16:10:25 2017 jsx
8+
// Last update Thu Apr 20 16:10:56 2017 jsx
9+
//
10+
11+
#ifndef CCRY_EVENT_HPP_
12+
#define CCRY_EVENT_HPP_
13+
14+
#include "./Includes/CondVar.hpp"
15+
16+
#endif /* end of include guard: EVENT_HPP_ */

Libs/Bin/Concurrency/CCRY/lock.hpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// mutex.hpp for mutx in /home/jsx/Epitech/tek2/C++2/plazza/cpp_plazza/Srcs/Objects/Concurrency/CCRY/
3+
//
4+
// Made by jsx
5+
6+
//
7+
// Started on Mon Apr 17 18:14:36 2017 jsx
8+
// Last update Thu Apr 20 15:19:52 2017 jsx
9+
//
10+
11+
#ifndef CCRY_MUTEX_HPP_
12+
#define CCRY_MUTEX_HPP_
13+
14+
#include "./Includes/Mutex.hpp"
15+
#include "./Includes/ScopedLock.hpp"
16+
#include "./Includes/UniqueLock.hpp"
17+
#include "./Includes/LockGuard.hpp"
18+
19+
#endif /* end of include guard: CCRY_MUTEX_HPP_ */

Libs/Bin/Concurrency/CCRY/process.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//
2+
// Created by julien on 22/04/17.
3+
//
4+
5+
#ifndef INCCCRY_PROCESS_HPP
6+
#define INCCCRY_PROCESS_HPP
7+
8+
#include "./Includes/Process.hpp"
9+
10+
#endif //INCCCRY_PROCESS_HPP

Libs/Bin/Concurrency/CCRY/threads.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// threads.hpp for threads in /home/jsx/Epitech/tek2/C++2/plazza/cpp_plazza/Srcs/Objects/Concurrency/CCRY/
3+
//
4+
// Made by jsx
5+
6+
//
7+
// Started on Mon Apr 17 18:08:59 2017 jsx
8+
// Last update Mon Apr 17 18:50:35 2017 jsx
9+
//
10+
11+
#ifndef CCRY_THREADS_HPP_
12+
#define CCRY_THREADS_HPP_
13+
14+
#include "./Includes/Thread.hpp"
15+
16+
#endif /* end of include guard: CCRY_THREADS_HPP_ */

Libs/Bin/Concurrency/Makefile

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
##
2+
## Makefile for makefile in /home/jsx/Epitech/tek2/C++2/plazza/cpp_plazza/Srcs/Objects/Concurrency/
3+
##
4+
## Made by jsx
5+
6+
##
7+
## Started on Mon Apr 17 17:30:10 2017 jsx
8+
## Last update Tue Apr 25 18:17:52 2017 jsx
9+
##
10+
11+
NAME = libconcurrency.a
12+
13+
INCNAME = CCRY
14+
15+
CC = g++
16+
17+
RM = rm -f
18+
19+
INCSRC = ./Srcs/Interfaces/IThread.hpp \
20+
./Srcs/Interfaces/IMutex.hpp \
21+
./Srcs/Interfaces/INamedPipe.hpp \
22+
./Srcs/Objects/Thread/Thread.hpp \
23+
./Srcs/Objects/Mutex/Mutex.hpp \
24+
./Srcs/Objects/ScopedLock/ScopedLock.hpp \
25+
./Srcs/Objects/CondVar/CondVar.hpp \
26+
./Srcs/Objects/UniqueLock/UniqueLock.hpp \
27+
./Srcs/Objects/LockGuard/LockGuard.hpp \
28+
./Srcs/Objects/NamedPipe/WritePipe.hpp \
29+
./Srcs/Objects/NamedPipe/ReadPipe.hpp \
30+
./Srcs/Objects/Process/Process.hpp \
31+
32+
CXXFLAGS = -W -Wall -Wextra -Werror -std=c++14 -fPIC \
33+
34+
LDFLAGS = -L./../../ -lutils
35+
36+
CXXFLAGS += -I./Srcs/Interfaces/ \
37+
-I./Srcs/Interfaces/ \
38+
-I./Srcs/Objects/Thread/ \
39+
-I./Srcs/Objects/Mutex/ \
40+
-I./Srcs/Objects/ScopedLock/ \
41+
-I./Srcs/Objects/CondVar/ \
42+
-I./Srcs/Objects/UniqueLock/ \
43+
-I./Srcs/Objects/LockGuard/ \
44+
-I./Srcs/Objects/NamedPipe/ \
45+
-I./Srcs/Objects/Process/ \
46+
-I./../../ \
47+
48+
SRC = ./Srcs/Objects/Thread/Thread.cpp \
49+
./Srcs/Objects/Mutex/Mutex.cpp \
50+
./Srcs/Objects/ScopedLock/ScopedLock.cpp \
51+
./Srcs/Objects/CondVar/CondVar.cpp \
52+
./Srcs/Objects/UniqueLock/UniqueLock.cpp \
53+
./Srcs/Objects/LockGuard/LockGuard.cpp \
54+
./Srcs/Objects/NamedPipe/WritePipe.cpp \
55+
./Srcs/Objects/NamedPipe/ReadPipe.cpp \
56+
./Srcs/Objects/Process/Process.cpp \
57+
58+
59+
OBJ = $(SRC:.cpp=.o) \
60+
61+
all: $(NAME)
62+
63+
$(NAME): $(OBJ)
64+
$(RM) -r $(INCNAME)/Includes/
65+
mkdir $(INCNAME)/Includes/
66+
cp $(INCSRC) -t $(INCNAME)/Includes/
67+
ar rc $(NAME) $(OBJ)
68+
ranlib $(NAME)
69+
cp $(NAME) ../../
70+
cp -r $(INCNAME) ../../
71+
$(RM) -r ./CCRY/Includes/
72+
@printf "\033[0;32mConcurrency library compiled successfully !\n\033[0m"
73+
74+
clean:
75+
$(RM) $(OBJ)
76+
77+
fclean: clean
78+
$(RM) -r $(INCNAME)/Includes/
79+
$(RM) $(NAME)
80+
$(RM) ../../$(NAME)
81+
$(RM) -r ../../$(INCNAME)
82+
83+
re: fclean all
84+
85+
%.o : %.c
86+
$(CC) $(CXXFLAGS) -c $< -o $@
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// IMutex.hpp for imutex in /home/jsx/Epitech/tek2/C++2/plazza/tmp/bootstrap/ex2/
3+
//
4+
// Made by jsx
5+
6+
//
7+
// Started on Mon Apr 10 10:51:39 2017 jsx
8+
// Last update Tue Apr 18 17:50:06 2017 jsx
9+
//
10+
11+
#ifndef IMUTEX_HPP
12+
#define IMUTEX_HPP
13+
14+
#include <mutex>
15+
16+
namespace ccry {
17+
class IMutex {
18+
public:
19+
virtual ~IMutex(void) {};
20+
virtual void lock(void) = 0;
21+
virtual void unlock(void) = 0;
22+
virtual bool trylock(void) = 0;
23+
};
24+
} /* ccry */
25+
26+
#endif /* end of include guard: IMUTEX_HPP */
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// Created by julien on 18/04/17.
3+
//
4+
5+
#ifndef CCRY_INAMEDPIPE_HPP
6+
#define CCRY_INAMEDPIPE_HPP
7+
8+
namespace ccry {
9+
10+
#define MESSAGE_SIZE 4096
11+
12+
class INamedPipe {
13+
public:
14+
virtual ~INamedPipe(void) {};
15+
virtual void create(void) = 0;
16+
};
17+
}
18+
19+
#endif //CCRY_INAMEDPIPE_HPP

0 commit comments

Comments
 (0)