LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-07-2013, 03:58 AM   #1
peterlowrie
Member
 
Registered: May 2009
Location: New Zealand
Distribution: mdv-x86/aurora-sparc64/solaris10-x86/solaris10-sparc
Posts: 42

Rep: Reputation: 15
mtx_os.c:35:37: error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)


The title above is the line in the log file that points to the file giving grief whilst attempting to compile.

Here is the line in question from the file mtx_os.c:

Code:
static spinlock_t g_oMtxInterlock = SPIN_LOCK_UNLOCKED;
Can anyone tell me what I must do to fix it? I'm not a programmer. Is the question about making a declaration and/or a function? How?

TIA
Peter
 
Old 07-08-2013, 02:13 AM   #2
a4z
Member
 
Registered: Feb 2009
Posts: 299

Rep: Reputation: 120Reputation: 120
try replacing the line with

static DEFINE_SPINLOCK(g_oMtxInterlock) ;

because SPIN_LOCK_UNLOCKED has been deprecated several years ago
 
1 members found this post helpful.
Old 07-08-2013, 08:38 PM   #3
peterlowrie
Member
 
Registered: May 2009
Location: New Zealand
Distribution: mdv-x86/aurora-sparc64/solaris10-x86/solaris10-sparc
Posts: 42

Original Poster
Rep: Reputation: 15
Thumbs up Thou art an undisputed GENIUS

Quote:
Originally Posted by a4z View Post
try replacing the line with

static DEFINE_SPINLOCK(g_oMtxInterlock) ;

because SPIN_LOCK_UNLOCKED has been deprecated several years ago
Impressive. It worked. Congratulations. Horaay, yipee and other excited expressions.

At the risk of being nosey may I please know 1, how came you by this particular knowledge and 2, is there something I could have read or looked into to find out that info from files already existing on the (a) system?

Bless you and thank you
 
Old 07-09-2013, 06:50 AM   #4
a4z
Member
 
Registered: Feb 2009
Posts: 299

Rep: Reputation: 120Reputation: 120
Quote:
Originally Posted by peterlowrie View Post
Impressive. It worked. Congratulations. Horaay, yipee and other excited expressions.

At the risk of being nosey may I please know 1, how came you by this particular knowledge and 2, is there something I could have read or looked into to find out that info from files already existing on the (a) system?

Bless you and thank you
there is nothing magic in knowing this
it just means that I had to deal with such a problem already some time ago, and even if I am a developer, when it happened I had to research in the internet for the solution.
 
  


Reply

Tags
c++, debug, driver, matrox


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: 'I2C_CLASS_TV_DIGITAL' undeclared (first use in this function) saman_artorious Linux - Hardware 1 09-11-2012 06:19 AM
error: 'NET_IPV4_TCP_VAR' undeclared here (not in a function) hayf Programming 3 08-27-2011 10:15 AM
error: ‘KBUILD_MODNAME’ undeclared in function ‘pci_register_driver’ amio.praba@gmail.com Linux - Embedded & Single-board computer 0 06-30-2008 02:31 AM
error: ‘LOGGING_FACILITY’ undeclared (first use in this function) nasim751 Linux - Software 1 04-19-2008 05:55 AM
undeclared here (not in a function) ashlesha Linux - Software 2 08-23-2006 11:29 PM


All times are GMT -5. The time now is 08:43 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration