Thread (26 messages) flat view 26 messages, 2 authors, 2012-09-10

[PATCH 06/14] tty/serial/core: Introduce poll_init callback

From: Alan Cox <hidden>
Date: 2012-09-10 11:09:04
Also in: linux-serial, lkml

+	tport = &state->port;
+	if (!(tport->flags & ASYNC_INITIALIZED) && port->ops->poll_init) {
+		mutex_lock(&tport->mutex);
+		ret = port->ops->poll_init(port);
+		/*
+		 * We don't set ASYNCB_INITIALIZED as we only initialized the
+		 * hw, e.g. state->xmit is still uninitialized.
+		 */
+		mutex_unlock(&tport->mutex);
+		if (ret)
+			return ret;
+	}
What stops a parallel open or close changing ASYNC_INITIALIZED after you
test and before you lock ?

Alan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help