Modules TSC: Improve inter-thread synchronization.

More work to do with server.unixtime and similar. Need to write Helgrind
suppression file in order to suppress the valse positives.
This commit is contained in:
antirez
2017-05-09 11:57:09 +02:00
parent 2a51bac44e
commit ece658713b
5 changed files with 75 additions and 20 deletions

View File

@ -28,6 +28,7 @@
*/
#include "server.h"
#include "atomicvar.h"
#include <sys/uio.h>
#include <math.h>
#include <ctype.h>
@ -88,7 +89,9 @@ client *createClient(int fd) {
}
selectDb(c,0);
c->id = server.next_client_id++;
uint64_t client_id;
atomicGetIncr(server.next_client_id,client_id,1);
c->id = client_id;
c->fd = fd;
c->name = NULL;
c->bufpos = 0;