lkml.org 
[lkml]   [2005]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: Illegal use of reserved word in system.h
Date
From
Adrian Bunk writes:



that's not a check whether the system supports SMP.



Looking at the source code of MySQL, it seems MySQL does some dirty

tricks for using the inlines from asm/atomic.h in userspace.



It's _really_ wrong to do this.



#JG

So the really, really stupid, idiotic, yet quick and effective hack to

get MySQL to build under a later 2.6 kernel is as follows. In

mysql-4.1.12/include/my_global.h, right after the three #ifndef

CONFIG_SMP lines, add these lines...

#ifndef CONFIG_NR_CPUS

#define CONFIG_NR_CPUS

#endif /* CONFIG_NR_CPUS */



This way, MySQL can continue depending on the SMP atomic macros in

asm-i386 from the Linux kernel, without going into kernel space. I

strongly doubt this is truly multithreaded (or SMP) safe, but that's how

MySQL has been running since 4.0 at least. Someone in the know should

fix this, and end this silliness.



John Gilbert

Thanks for ignoring the sig.



-----------------------------------------

This message (including any attachments) may contain confidential

information intended for a specific individual and purpose. If you are not

the intended recipient, delete this message. If you are not the intended

recipient, disclosing, copying, distributing, or taking any action based on

this message is strictly prohibited.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-19 03:55    [W:0.030 / U:1.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site