Added simple_mutex_t dcb->mutex to DCB struct to protect processing of single dcb in poll.c:poll_waitevents. This is a coarse locking but seems to work with multiple threads at least with very simple load.

Added trace logging to many locations.
This commit is contained in:
vraatikka
2013-08-16 23:52:10 +03:00
parent 7c0ed171a0
commit 97b3da1d79
5 changed files with 130 additions and 51 deletions

View File

@ -20,6 +20,7 @@
#include <spinlock.h>
#include <buffer.h>
#include <gwbitmask.h>
#include <skygw_utils.h>
struct session;
struct server;
@ -133,6 +134,7 @@ typedef struct {
* gateway may be selected to execute the required actions when a network event occurs.
*/
typedef struct dcb {
simple_mutex_t mutex; /**< Protects dcb processing. Coarse and temporary? */
int fd; /**< The descriptor */
int state; /**< Current descriptor state */
char *remote; /**< Address of remote end */