* set_user_nice() not defined on 2.4.21+
@ 2003-01-10 18:21 Xiaogeng (Shawn) Jin
2003-01-10 23:04 ` Joakim Tjernlund
0 siblings, 1 reply; 4+ messages in thread
From: Xiaogeng (Shawn) Jin @ 2003-01-10 18:21 UTC (permalink / raw)
To: linux-mtd
Hi,
When compiled JFFS2 with kernel 2.4.21-pre3, the linker complains that
the reference to set_user_nice() in function
jffs2_garbage_collect_thread() hasn't been defined. I traced the code
down to <linux/mtd/compatmac.h> and found that set_user_nice() is not
defined if linux verion is equal or greater than 2.4.21. See the code
below. Why? Does it mean that 2.4.21+ has already such a function
defined somewhere else or that 2.4.21+ doesn't need it? Actually I
searched 2.4.21-pre3 code and found no set_user_nice() defined except in
<linux/mtd/compatmac.h>. I guess it's possibly a bug.
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) /* Is this right? */
#define set_user_nice(tsk, n) do { (tsk)->priority = 20-(n); } while(0)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,4,21) &&
!defined(RED_HAT_LINUX_KERNEL)
#define set_user_nice(tsk, n) do { (tsk)->nice = n; } while(0)
#endif
--
Shawn Jin
RedSwitch Inc.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: set_user_nice() not defined on 2.4.21+
2003-01-10 18:21 set_user_nice() not defined on 2.4.21+ Xiaogeng (Shawn) Jin
@ 2003-01-10 23:04 ` Joakim Tjernlund
2003-01-11 0:14 ` Xiaogeng (Shawn) Jin
0 siblings, 1 reply; 4+ messages in thread
From: Joakim Tjernlund @ 2003-01-10 23:04 UTC (permalink / raw)
To: Xiaogeng (Shawn) Jin, linux-mtd
Hi
I had the impression that set_user_nice() would be in 2.4.21 when I added set_user_nice() to
mtd/compatmac.h. I can change it to KERNEL_VERSION(2,5,0) or someone can
submit a patch to Marcelo.
Jocke
> Hi,
>
> When compiled JFFS2 with kernel 2.4.21-pre3, the linker complains that
> the reference to set_user_nice() in function
> jffs2_garbage_collect_thread() hasn't been defined. I traced the code
> down to <linux/mtd/compatmac.h> and found that set_user_nice() is not
> defined if linux verion is equal or greater than 2.4.21. See the code
> below. Why? Does it mean that 2.4.21+ has already such a function
> defined somewhere else or that 2.4.21+ doesn't need it? Actually I
> searched 2.4.21-pre3 code and found no set_user_nice() defined except in
> <linux/mtd/compatmac.h>. I guess it's possibly a bug.
>
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) /* Is this right? */
> #define set_user_nice(tsk, n) do { (tsk)->priority = 20-(n); } while(0)
> #elif LINUX_VERSION_CODE < KERNEL_VERSION(2,4,21) &&
> !defined(RED_HAT_LINUX_KERNEL)
> #define set_user_nice(tsk, n) do { (tsk)->nice = n; } while(0)
> #endif
>
> --
> Shawn Jin
> RedSwitch Inc.
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: set_user_nice() not defined on 2.4.21+
2003-01-10 23:04 ` Joakim Tjernlund
@ 2003-01-11 0:14 ` Xiaogeng (Shawn) Jin
2003-01-11 0:25 ` Joakim Tjernlund
0 siblings, 1 reply; 4+ messages in thread
From: Xiaogeng (Shawn) Jin @ 2003-01-11 0:14 UTC (permalink / raw)
To: Joakim Tjernlund; +Cc: linux-mtd
Hi Jocke,
Are you maintaining at least mtd/compatmac.h? I also found a
compatibility problem of rq_data_dir(). I did find that this function is
already defined in linux/blkdev.h of 2.4.21-pre3. So probably
mtd/compatmac.h needn't define it again.
Joakim Tjernlund wrote:
> Hi
>
> I had the impression that set_user_nice() would be in 2.4.21 when I added set_user_nice() to
> mtd/compatmac.h. I can change it to KERNEL_VERSION(2,5,0) or someone can
> submit a patch to Marcelo.
- Shawn.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: set_user_nice() not defined on 2.4.21+
2003-01-11 0:14 ` Xiaogeng (Shawn) Jin
@ 2003-01-11 0:25 ` Joakim Tjernlund
0 siblings, 0 replies; 4+ messages in thread
From: Joakim Tjernlund @ 2003-01-11 0:25 UTC (permalink / raw)
To: Xiaogeng (Shawn) Jin; +Cc: linux-mtd
> Hi Jocke,
>
> Are you maintaining at least mtd/compatmac.h?
No, I just added set_user_nice() after discussion with David Woodhouse since I ran into
the same problem as you.
> I also found a
> compatibility problem of rq_data_dir(). I did find that this function is
> already defined in linux/blkdev.h of 2.4.21-pre3. So probably
> mtd/compatmac.h needn't define it again.
Best to run this via David Woodhouse. He knows this much better than I do.
>
> Joakim Tjernlund wrote:
> > Hi
> >
> > I had the impression that set_user_nice() would be in 2.4.21 when I added set_user_nice() to
> > mtd/compatmac.h. I can change it to KERNEL_VERSION(2,5,0) or someone can
> > submit a patch to Marcelo.
>
> - Shawn.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-01-10 23:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-10 18:21 set_user_nice() not defined on 2.4.21+ Xiaogeng (Shawn) Jin
2003-01-10 23:04 ` Joakim Tjernlund
2003-01-11 0:14 ` Xiaogeng (Shawn) Jin
2003-01-11 0:25 ` Joakim Tjernlund
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox