[withdrawn] pps-add-non-blocking-option-to-pps_fetch-ioctl.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: [withdrawn] pps-add-non-blocking-option-to-pps_fetch-ioctl.patch removed from -mm tree
To: Paul.Chavent@xxxxxxxx,agordeev@xxxxxxxxxx,giometti@xxxxxxxxxxxx,paul.chavent@xxxxxxxx,mm-commits@xxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Wed, 16 Apr 2014 13:27:39 -0700


The patch titled
     Subject: pps : add non blocking option to PPS_FETCH ioctl.
has been removed from the -mm tree.  Its filename was
     pps-add-non-blocking-option-to-pps_fetch-ioctl.patch

This patch was dropped because it was withdrawn

------------------------------------------------------
From: Paul Chavent <Paul.Chavent@xxxxxxxx>
Subject: pps : add non blocking option to PPS_FETCH ioctl.

The PPS_FETCH ioctl is blocking still the reception of a PPS event.  But,
in some case, one may immediately need the last event date.  This patch
allow to get the result of PPS_FETCH if the device has the O_NONBLOCK flag
set.

Signed-off-by: Paul Chavent <paul.chavent@xxxxxxxx>
Acked-by: Rodolfo Giometti <giometti@xxxxxxxxxxxx>
Cc: Alexander Gordeev <agordeev@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/pps/pps.c |   55 +++++++++++++++++++++++---------------------
 1 file changed, 29 insertions(+), 26 deletions(-)

diff -puN drivers/pps/pps.c~pps-add-non-blocking-option-to-pps_fetch-ioctl drivers/pps/pps.c
--- a/drivers/pps/pps.c~pps-add-non-blocking-option-to-pps_fetch-ioctl
+++ a/drivers/pps/pps.c
@@ -152,35 +152,38 @@ static long pps_cdev_ioctl(struct file *
 		if (err)
 			return -EFAULT;
 
-		ev = pps->last_ev;
+		if (!(file->f_flags & O_NONBLOCK)) {
+			ev = pps->last_ev;
 
-		/* Manage the timeout */
-		if (fdata.timeout.flags & PPS_TIME_INVALID)
-			err = wait_event_interruptible(pps->queue,
-					ev != pps->last_ev);
-		else {
-			unsigned long ticks;
-
-			dev_dbg(pps->dev, "timeout %lld.%09d\n",
-					(long long) fdata.timeout.sec,
-					fdata.timeout.nsec);
-			ticks = fdata.timeout.sec * HZ;
-			ticks += fdata.timeout.nsec / (NSEC_PER_SEC / HZ);
-
-			if (ticks != 0) {
-				err = wait_event_interruptible_timeout(
-						pps->queue,
-						ev != pps->last_ev,
-						ticks);
-				if (err == 0)
-					return -ETIMEDOUT;
+			/* Manage the timeout */
+			if (fdata.timeout.flags & PPS_TIME_INVALID)
+				err = wait_event_interruptible(pps->queue,
+						ev != pps->last_ev);
+			else {
+				unsigned long ticks;
+
+				dev_dbg(pps->dev, "timeout %lld.%09d\n",
+						(long long) fdata.timeout.sec,
+						fdata.timeout.nsec);
+				ticks = fdata.timeout.sec * HZ;
+				ticks += fdata.timeout.nsec /
+					(NSEC_PER_SEC / HZ);
+
+				if (ticks != 0) {
+					err = wait_event_interruptible_timeout(
+							pps->queue,
+							ev != pps->last_ev,
+							ticks);
+					if (err == 0)
+						return -ETIMEDOUT;
+				}
 			}
-		}
 
-		/* Check for pending signals */
-		if (err == -ERESTARTSYS) {
-			dev_dbg(pps->dev, "pending signal caught\n");
-			return -EINTR;
+			/* Check for pending signals */
+			if (err == -ERESTARTSYS) {
+				dev_dbg(pps->dev, "pending signal caught\n");
+				return -EINTR;
+			}
 		}
 
 		/* Return the fetched timestamp */
_

Patches currently in -mm which might be from Paul.Chavent@xxxxxxxx are


--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux