Add comments.

This commit is contained in:
Darko 2015-03-04 20:56:48 +01:00
parent 5bca484555
commit 2c129e97a1

11
ms.h
View file

@ -8,10 +8,21 @@
#include <string.h>
#include <sys/wait.h>
/* Merge arrays left and right into res array.
*/
void mymerge(int left[], size_t leftlen, int right[], size_t rightlen, int res[]);
/* Sort arr of size len using mergesort.
*/
int mymergesort(int arr[], size_t len);
/* Sort arr of size len using mergesort.
* This function uses parallel processes for sorting.
* It is implemented by forking new process for right
* part of array. New child is forked only if
* current subarray len is less or equal than original
* array len / cnt parameter.
*/
int mymergesortp(int arr[], size_t len, int cnt);
#endif