76 Commits

Author SHA1 Message Date
zenon
b83f143c9d Add comment for circular buffer 2018-06-09 13:41:22 +02:00
zenon
cdb2083564 Add dependencies for docs generation 2018-06-09 13:39:10 +02:00
zenon
12787eab2e Don't generate latex output 2018-06-09 13:29:29 +02:00
zenon
89c4f3f53f Add comments for functions and make functions static 2018-06-09 13:28:30 +02:00
zenon
cb99f6a19a Move include to common header file 2018-06-09 13:00:42 +02:00
zenon
61d457dfc8 Add static to each function to limit visibility 2018-06-09 12:59:21 +02:00
zenon
3f975a0721 Add comments for documentation to each function 2018-06-09 12:58:24 +02:00
zenon
e9648111f5 Initial commit 2018-06-09 12:27:19 +02:00
zenon
5122699c02 Remove pdf files from excluded files 2018-06-09 12:26:52 +02:00
zenon
35fddb3e46 Remove Doxyfile from excluded files 2018-06-09 12:25:31 +02:00
zenon
d6674d7aa4 Generator(s) no properly exit(s) 2018-06-08 22:18:02 +02:00
zenon
8277a26ed2 Semaphores static again 2018-06-08 15:16:41 +02:00
zenon
255708ebc0 Try setting global semaphores as non-static 2018-06-08 12:28:57 +02:00
zenon
ac4559ab26 Remove wrong sem_wait call 2018-06-08 11:39:32 +02:00
zenon
3c0ce892a9 Loop until MAX_ITEMS and not bestSolutionLength 2018-06-08 11:35:59 +02:00
zenon
029ce6264f Set initial bestSolution to all INT_MAX and if all INT_MAX set
bestSolutionLength to 17
2018-06-08 11:31:31 +02:00
zenon
5398b9dccd Calculate bestSolutionLength correctly 2018-06-08 11:21:03 +02:00
zenon
72da8e371b Initialize bestSolution to all -1 2018-06-08 11:12:00 +02:00
zenon
051a727caf Write complete solution array to shared memory without any delimiters 2018-06-08 11:03:54 +02:00
zenon
065f445c79 Change size of shared memory to MAX_SIZE instead of CIRC_BUF_SIZE 2018-06-08 10:58:01 +02:00
zenon
8605c6e820 getSolution writes head instead of where head is pointing 2018-06-08 10:21:33 +02:00
zenon
9cb4d66d4b Change wrong wait_sem to post_sem to avoid deadlock 2018-06-08 10:08:37 +02:00
zenon
da416ca283 Do unlinking of SEM_WRITE_END in supervisor 2018-06-07 18:24:12 +02:00
zenon
829cc3cb3a Change error messages 2018-06-07 18:13:37 +02:00
zenon
834f3f7bf7 Unlinking not done in generator except for SEM_WRITE_END 2018-06-07 18:04:38 +02:00
zenon
84c2dcdd78 Modify error messages 2018-06-07 17:58:02 +02:00
zenon
de4ed6532c Rearrange cleanup() function and copy wait_sem() function from
supervisor
2018-06-07 17:52:49 +02:00
zenon
6ee735a030 Modify cleanup() function and make semaphores and shared memory global 2018-06-07 17:46:41 +02:00
zenon
8f91b5f974 Added cleanup() function 2018-06-07 17:46:00 +02:00
zenon
51724a3637 Proper closing and unlinking of semaphores and shared memory 2018-06-07 17:38:20 +02:00
zenon
a04c1aee71 Change name of semaphores 2018-06-07 17:26:28 +02:00
zenon
3057b4a0d4 Add own wait function 2018-06-07 17:08:49 +02:00
zenon
8b9d48e4d8 Not necessary to modify array of caller function main() 2018-06-07 17:00:25 +02:00
zenon
56df02a288 Initialize array for new solution to -1 2018-06-07 16:58:16 +02:00
zenon
3e34253092 Remove initializer of bestSolution array 2018-06-07 16:51:12 +02:00
zenon
a7ebeb7246 Change MAX_ITEMS to CIRC_BUF_SIZE for shared memory access 2018-06-07 16:50:02 +02:00
zenon
ed71c16797 Add new variable for CIRC_BUF_SIZE 2018-06-07 16:48:04 +02:00
zenon
1fbd1bf2b8 Added code for replacing bestSolution so far with new one 2018-06-07 16:35:01 +02:00
Kranklyboy
699d1b9ed4 Read whole solutions from shared memory 2018-06-07 12:31:25 +02:00
Kranklyboy
a8d8999fa1 Allow one more int for separating solutions in shared memory 2018-06-07 12:30:17 +02:00
Kranklyboy
5a9d00c48a Write whole solutions to shared memory 2018-06-07 12:18:36 +02:00
zenon
10ec964fec Read and write solution characterwise 2018-06-07 10:40:55 +02:00
zenon
eb45b4eb92 Allow shared memory read 2018-06-07 10:35:49 +02:00
zenon
5fe85da2ef Loop until supervisor exits 2018-06-07 10:33:42 +02:00
zenon
93131dc027 Cleanup of shared memory and semaphores 2018-06-07 10:30:15 +02:00
zenon
3af17e0d84 Write whole solution to shared memory and -1 if acyclic 2018-06-07 10:22:30 +02:00
zenon
db393a0b43 Modify spacing 2018-06-07 10:10:55 +02:00
zenon
80afbc9473 Activate shared memory and semaphores 2018-06-07 10:09:45 +02:00
zenon
160d66c9c4 Remove unnecessary isEmpty() function 2018-06-07 10:07:47 +02:00
zenon
d1ca1d59ce Remove count of validItems which is not needed because of the use of
semaphores
2018-06-07 10:04:25 +02:00