Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8653137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:28:15+00:00 2026-06-12T14:28:15+00:00

On one processor, in the same thread, first raw_spin_lock() is called, then it starts

  • 0

On one processor, in the same thread, first raw_spin_lock() is called, then it starts a hrtimer and goes back to raw_spin_lock() again where it will spin there. In the hrtimer interrupt handler function, raw_spin_unlock() will be called.

Will this cause a deadlock or not? Will spinning on raw_spin_lock() disable interrupt?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:28:16+00:00Added an answer on June 12, 2026 at 2:28 pm

    raw_spin_lock_irq() and raw_spin_lock_irqsave() disable local interrupts, however interrupts on other CPUs still may occur. raw_spin_lock() does not.

    Using spin locks with local interrupts enabled carelessly may lead to a deadlock if any interrupt handler attempts to lock already held spin lock. For the same reason none of the functions I mentioned is re-entrant. It will not be possible for the lock owner to ever release the lock. However, since in this case ISR will release the lock deadlock should not be a problem.

    I think you should also check out completion variables which were designed to do what you seem to try to accomplish using spin lock in such unusual way. See this and also functions wait_on_completion(_interruptible)(_timeout)() here.

    More information on spin locks can be found here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Perl script that launches 2 threads,one for each processor. I need
I have two threads, one thread processes a queue and the other thread adds
I am investigating how to get thread ID when the function timer_create() is called.
When AutoResetEvent calls WaitOne on Process 1 and it is called again in Process2,
QueryPerformanceCounter() and Stopwatch.GetTimestamp() both return the tick count from one of the processors. I'd
I'm not very expert on how processors work, but one might imagine that it
So a OS multi-tasks and runs one process at a given moment (assuming it's
Goal Pass images generated by one process efficiently and at very high speed to
I want to make pipe or queue in Python between one process (current) and
In a system I am currently working on, there is one process that loads

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.