From d1156ad4f9b1e0fb07275fff976890fd3bc90e05 Mon Sep 17 00:00:00 2001 From: Chaskiel M Grundman Date: Thu, 2 Mar 2006 06:39:45 +0000 Subject: [PATCH] refridgerator-update-20060227 try to make refrigerator work again --- src/rx/LINUX/rx_kmutex.c | 18 +++++++++++++++++- src/rx/LINUX/rx_knet.c | 18 ++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/rx/LINUX/rx_kmutex.c b/src/rx/LINUX/rx_kmutex.c index ea31a8782..b1d8bf99a 100644 --- a/src/rx/LINUX/rx_kmutex.c +++ b/src/rx/LINUX/rx_kmutex.c @@ -99,7 +99,23 @@ afs_cv_wait(afs_kcondvar_t * cv, afs_kmutex_t * l, int sigok) while(seq == cv->seq) { schedule(); - /* should we refrigerate? */ +#ifdef AFS_LINUX26_ENV +#ifdef CONFIG_PM + if ( +#ifdef PF_FREEZE + current->flags & PF_FREEZE +#else + !current->todo +#endif + ) +#ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE + refrigerator(PF_FREEZE); +#else + refrigerator(); +#endif + set_current_state(TASK_INTERRUPTIBLE); +#endif +#endif } remove_wait_queue(&cv->waitq, &wait); diff --git a/src/rx/LINUX/rx_knet.c b/src/rx/LINUX/rx_knet.c index 7cddc228c..b0b7d9c06 100644 --- a/src/rx/LINUX/rx_knet.c +++ b/src/rx/LINUX/rx_knet.c @@ -164,6 +164,24 @@ osi_NetReceive(osi_socket so, struct sockaddr_in *from, struct iovec *iov, TO_KERNEL_SPACE(); if (code < 0) { +#ifdef AFS_LINUX26_ENV +#ifdef CONFIG_PM + if ( +#ifdef PF_FREEZE + current->flags & PF_FREEZE +#else + !current->todo +#endif + ) +#ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE + refrigerator(PF_FREEZE); +#else + refrigerator(); +#endif + set_current_state(TASK_INTERRUPTIBLE); +#endif +#endif + /* Clear the error before using the socket again. * Oh joy, Linux has hidden header files as well. It appears we can * simply call again and have it clear itself via sock_error(). -- 2.39.5