8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm a OS X user (MacBook Pro, OS X Lion) and I need it to wake up on Mondays, Wednesdays, Thursdays and Saturdays at 9:00 AM
on the rest of the days of the week at 7:00
I issue the following commands:
sudo pmset repeat wake MWRS 09:00:00 for the former
sudo pmset repeat wake TFU... (1 Reply)
Discussion started by: scrutinizerix
1 Replies
2. Programming
among the below socket programming api's, please let me know which are blocking and non-blocking.
socket
accept
bind
listen
write
read
close (2 Replies)
Discussion started by: VSSajjan
2 Replies
3. UNIX for Dummies Questions & Answers
As the title implies I'm having trouble setting up Wake-On-LAN with my Debian box. Here is the output from ethtool and my /etc/network/interfaces:
# cat /etc/network/interfaces
# /etc/network/interfaces - configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo... (2 Replies)
Discussion started by: Azrael
2 Replies
4. Programming
Hi guys,
I am creating two posix threads. I have some queries, hopefully you will help me out with them
1) How can I put a thread to indefinite sleep, for indefinite time period. I am familiar with this
sleep(5);
for 5 second, how can I make it indefinite??
2) How can one thread wake another... (11 Replies)
Discussion started by: gabam
11 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
Is it possible to do the following in Linux (kernel 2.6.x):
- A user-space thread goes to "sleep". Using any call/mechanism
- On a hardware generated interrupt, the Interrupt handler (ISR) "wakes" the sleeping user-thread.
I have seen wait_event() and wake_up() but it appears... (1 Reply)
Discussion started by: agaurav
1 Replies
6. UNIX for Advanced & Expert Users
Hello, I'm searching for a proper way to let the kernel space ISR(implemented in a kernel module) wake up a user space thread on a hardware interrupt.
Except for sending a real-time signal, is it possible to use a semaphore?
I've searched it on google, but it seems impossible to share a... (0 Replies)
Discussion started by: aaronwong
0 Replies
7. Shell Programming and Scripting
m old to Unix but new to scripting
I have a MacBook running osx that I want to use as an nfs client. The server will be a linux box with a wake on lan card. Here's the idea. Run a cron command on the mac every minute that checks if I am on my home wireless network (the linux box is wired to... (6 Replies)
Discussion started by: anon0mus
6 Replies
8. UNIX for Advanced & Expert Users
Im old to Unix but new to scripting
I have a MacBook running osx that I want to use as an nfs client. The server will be a linux box with a wake on lan card. Here's the idea. Run a cron command on the mac every minute that checks if I am on my home wireless network (the linux box is wired to... (0 Replies)
Discussion started by: anon0mus
0 Replies
Thread::Queue(3pm) Perl Programmers Reference Guide Thread::Queue(3pm)
NAME
Thread::Queue - thread-safe queues
SYNOPSIS
use Thread::Queue;
my $q = new Thread::Queue;
$q->enqueue("foo", "bar");
my $foo = $q->dequeue; # The "bar" is still in the queue.
my $foo = $q->dequeue_nb; # returns "bar", or undef if the queue was empty
my $left = $q->pending; # returns the number of items still in the queue
DESCRIPTION
A queue, as implemented by "Thread::Queue" is a thread-safe data structure much like a list. Any number of threads can safely add elements
to the end of the list, or remove elements from the head of the list. (Queues don't permit adding or removing elements from the middle of
the list).
FUNCTIONS AND METHODS
new The "new" function creates a new empty queue.
enqueue LIST
The "enqueue" method adds a list of scalars on to the end of the queue. The queue will grow as needed to accommodate the list.
dequeue The "dequeue" method removes a scalar from the head of the queue and returns it. If the queue is currently empty, "dequeue" will
block the thread until another thread "enqueue"s a scalar.
dequeue_nb
The "dequeue_nb" method, like the "dequeue" method, removes a scalar from the head of the queue and returns it. Unlike "dequeue",
though, "dequeue_nb" won't block if the queue is empty, instead returning "undef".
pending The "pending" method returns the number of items still in the queue.
SEE ALSO
threads, threads::shared
perl v5.8.0 2002-06-01 Thread::Queue(3pm)