LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Why and how to use condition variables? - Pthreads

Posted 02-06-2013 at 01:40 AM by Aquarius_Girl
Updated 02-06-2013 at 05:55 AM by Aquarius_Girl

  • Q: What is a condition variable?
    A: A condition variable is a variable of type `pthread_cond_t`. It is
    used to suspend the thread execution until some condition is true.

  • Q: Is a condition variable dependent on a mutex lock to work properly? Why?
    A: Explaining with an example:

    Assumptions:
    1. There is a variable `x` whose current value is 0.
    2. There is a thread `threadA` whose task is to start some job once the
      variable `x` reaches the value 1000.
    3. There
...
Senior Member
Posted in PThreads
Views 2973 Comments 0 Aquarius_Girl is offline
Old

#! toddler just like me (:

Posted 01-31-2013 at 08:26 AM by jamison20000e
Updated 09-04-2017 at 03:56 PM by jamison20000e

My nephew JJ is almost two: so of course I'm setting him up a (literally this (now on Xfce; LibreOffice Writer; Iceweasel; Google Drive) computer (vaio-pcv-r556ds | Linux-Debain-Crunchbangcrun\#!-Openbox\*). For the first year I will lock it down with baby-friendly programs mostly only icons and widgets (e.g: solar system, bouncing ball, sliding block puzzle, moon and stuff) so no taskbar on WMs like: Educational Desktops(most *nix flavors offer free Edu-D-tops i.g. Sugar or educational-desktop-lxde...
Senior Member
Posted in Newbie++
Views 10787 Comments 5 jamison20000e is offline
Old

C++ had lambda functions!

Posted 01-31-2013 at 01:21 AM by hydraMax (Bits and Pixels)

I'm doing a CS class which forces me to use C++. I was not very excited about this. However, I have recently be greatly encouraged by the discovery that C++ does, in fact, have lambda functions (or, more properly, anonymous functions) at least in the C++11 standard:

https://en.wikipedia.org/wiki/Anonym...ctions#C.2B.2B

Basically, the big deal here is that I can construct new functions /inside/ of other functions, and even capture variables from the context. This,...
Member
Posted in Uncategorized
Views 1386 Comments 0 hydraMax is offline
Old

bogged down blog

Posted 01-29-2013 at 02:45 AM by pandanuma
Tags non scents

so...dont post to your own blog nimnul
took long time find my blog link on the right...
clik that to make nice blog
ya...over there...on the right...under my lq...

excuses are no excuse
i blog as much as i exercise
therefour i am
...not a blogger
excuses are no uses

stay tooned for more bloggonie
but dont hold yur berette

next time i will figure out to catagorize
perhaps hep is in blog settings...
Member
Posted in Uncategorized
Views 604 Comments 0 pandanuma is offline
Old

Controlling VLC via openbox key bindings... and wget(!)

Posted 01-28-2013 at 10:21 AM by the dsc (linux-related notes)
Updated 01-28-2013 at 06:10 PM by the dsc (fixing some stuff, redirection didn't work that way)

On openbox' rc.xml, in the corresponding section:

Code:
    <keybind key="W-z">
      <action name="Execute">
<execute>wget http://127.0.0.1:8080/requests/status.xml?command=pl_previous -O /dev/null</execute> 
      </action>
    </keybind>
    <keybind key="W-x">
      <action name="Execute">
	<execute>wget http://127.0.0.1:8080/requests/status.xml?command=pl_next
...
Member
Posted in Uncategorized
Views 1752 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 01:27 AM.

Main Menu
Advertisement
Advertisement
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
Open Source Consulting | Domain Registration