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 7745269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:58:17+00:00 2026-06-01T09:58:17+00:00

While following path for wait system call, noticed that before calling do_wait_thread we get

  • 0

While following path for wait system call, noticed that before calling
do_wait_thread we get hold of tasklist_lock. I am trying to understand the significance
of tasklist_lock & where its appropriate to use.

716        read_lock(&tasklist_lock);
1717        tsk = current;
1718        do {
1719                retval = do_wait_thread(wo, tsk);
1720                if (retval)
1721                        goto end;
1722
1723                retval = ptrace_do_wait(wo, tsk);
1724                if (retval)
1725                        goto end;
1726
1727                if (wo->wo_flags & __WNOTHREAD)
1728                        break;
1729        } while_each_thread(current, tsk);
1730        read_unlock(&tasklist_lock);

I looked at the declaration of tasklist_lock, It is as follows.

/*
 251 * This serializes "schedule()" and also protects
 252 * the run-queue from deletions/modifications (but
 253 * _adding_ to the beginning of the run-queue has
 254 * a separate lock).
 255 */
 256 extern rwlock_t tasklist_lock;
 257 extern spinlock_t mmlist_lock;

I am not able to understand where we should use this. Can you please let me know about it.
Appreciate your help.

  • 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-01T09:58:18+00:00Added an answer on June 1, 2026 at 9:58 am

    The loop iterates over each thread of the current task. Holding the tasklist lock ensures that none of those threads disappear while the loop is running.

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

Sidebar

Related Questions

while executing the following query, i get an error that there's an error in
I have the following code in specman: var x := some.very.long.path.to.a.variable.in.another.struct; while (x ==
I get an exception while executing following piece of code bool FieldValueMessage::Get(const std::string &field,
Consider the following code: while(true) { someFunction(); Thread.sleep(1000); } What I want is that,
I'm getting the following errors from MSBuild while trying to build a solution: C:\dev\MySln.sln
Whenever I set android.library.reference.1=G\:Projects\Android\library\core\ in ant.properties , I get the following error while building:
while running rake db:migrate i get the following error : rake db:migrate (in /Users/hrastogi/ruby_project/contactlist)
While configuring FLOW3, I get the following error #1315561483: It seems like the PHP
I'm trying to get plaxo's Address Book Access working. I'm having the following problem:
I receive the following Exception while trying to send an email (using Seam) Caused

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.