summaryrefslogtreecommitdiff
path: root/toxcore/util.c
diff options
context:
space:
mode:
authorzoff99 <zoff@zoff.cc>2018-02-05 21:07:26 +0100
committeriphydf <iphydf@users.noreply.github.com>2018-02-17 16:32:25 +0000
commit82662d4e16937997c36d2090a17c3b2389fa4ad5 (patch)
tree2edd3ed06711e7b04a0584daac6986026e299dcd /toxcore/util.c
parent35f13ef51dbf99c3d45d04f572e9e88795df7ae6 (diff)
Make outgoing Filetransfers round-robin.
Instead of 1 FT blocking all others.
Diffstat (limited to 'toxcore/util.c')
-rw-r--r--toxcore/util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/toxcore/util.c b/toxcore/util.c
index ff612b1a..e19808a2 100644
--- a/toxcore/util.c
+++ b/toxcore/util.c
@@ -195,3 +195,13 @@ int create_recursive_mutex(pthread_mutex_t *mutex)
195 195
196 return 0; 196 return 0;
197} 197}
198
199int32_t max_s32(int32_t a, int32_t b)
200{
201 return a > b ? a : b;
202}
203
204uint64_t min_u64(uint64_t a, uint64_t b)
205{
206 return a < b ? a : b;
207}