[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kernel-janitors
Subject:    [PATCH] net/ipv4/tcp.c - Use the task state macros provided in
From:       Ryan Bradetich <rbradetich () uswest ! net>
Date:       2002-07-20 5:53:22
[Download RAW message or body]

Hello Janitors,

This patch is the third of many patches to convert task state
changes to use the macros provided in include/linux/sched.h.

This is against kernel 2.5.26.

I have not done any testing other then to verify it compiles.

Thanks,

- Ryan

--- net/ipv4/tcp.c.orig	Fri Jul 19 23:46:25 2002
+++ net/ipv4/tcp.c	Fri Jul 19 23:48:07 2002
@@ -734,7 +734,7 @@
 		*timeo = current_timeo;
 	}
 out:
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(sk->sleep, &wait);
 	return err;
 
@@ -2005,7 +2005,7 @@
 			lock_sock(sk);
 		} while (!signal_pending(tsk) && timeout);
 
-		tsk->state = TASK_RUNNING;
+		__set_task_state(tsk, TASK_RUNNING);
 		remove_wait_queue(sk->sleep, &wait);
 	}
 
@@ -2185,7 +2185,7 @@
 	 */
 	add_wait_queue_exclusive(sk->sleep, &wait);
 	for (;;) {
-		current->state = TASK_INTERRUPTIBLE;
+		__set_current_state(TASK_INTERRUPTIBLE);
 		release_sock(sk);
 		if (!tp->accept_queue)
 			timeo = schedule_timeout(timeo);
@@ -2203,7 +2203,7 @@
 		if (!timeo)
 			break;
 	}
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(sk->sleep, &wait);
 	return err;
 }



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Kernel-janitor-discuss mailing list
Kernel-janitor-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kernel-janitor-discuss

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic