Sponsored Content
Top Forums Programming libcurl multi interface problem Post 302435072 by Corona688 on Tuesday 6th of July 2010 10:01:00 AM
Old 07-06-2010
What is msleep?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

network interface problem

Hi expert, Need some help on network interface issue.. I have added 2 x NIC card onto the Ultra 2 system recently and configured as hme1 and hme2. I have unconfigured the onboard hme0 network interface and it was running fine till few days later, i keep recieving error messages showing hme0... (6 Replies)
Discussion started by: sc2005
6 Replies

2. AIX

Problem with a Network Interface

Hi every body, I have a Fiber Channel interface (fcs2) in AIX 5.2. This interface was fine & up but for some reason I could not return this interface UP again after I set it DOWN. When I tried to set this interface UP I encountered the following error: Method error... (7 Replies)
Discussion started by: aldowsary
7 Replies

3. UNIX for Dummies Questions & Answers

Multi Network card interface problem

My system info is show below:- #uname -a SunOS qfserver 5.8 Generic_117350-29 sun4u sparc SUNW,Sun-Blade-2500 and I have two network card as shown below:- #ifconfig -a lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 bge0:... (1 Reply)
Discussion started by: sarifudin
1 Replies

4. UNIX for Advanced & Expert Users

interface problem

hi all, i have problem with my box, until now i can't investigate the root cause of my issue at my box. here the problem. i have a box as a squid server just forward all request packet from one interface and receive the packet then forward to client at the same interface. but after 5 hours i... (1 Reply)
Discussion started by: tindasz
1 Replies

5. AIX

Multi Link Interface Runtime - where to download ?

Hello, I need "devices.common.IBM.ml 1.4.0.0 C F Multi Link Interface Runtime" to be installed on my machine. I need it for two SAN cards to work correctly. Where do I get it ? thanks Vilius (1 Reply)
Discussion started by: vilius
1 Replies

6. Debian

Problem with graphical interface

Hi, i have problems with an installation of Debian i386 505 in a pc. The hardware it is a mother soyo with a chipset via. When i install the xorg, the installation it`s succesfull, but when i type startx, the pc don`t respond. I am from Argentina and my English it isn`t good. Sorry. (0 Replies)
Discussion started by: Kritar
0 Replies

7. Solaris

Network interface problem

HI, genunix: NOTICE: ce0: xcvr addr:0x01 - link up 100 Mbps half duplex genunix: WARNING: ce0: fault detected external to device; service degraded genunix: WARNING: ce0: xcvr addr:0x01 - link down genunix: NOTICE: ce0: fault cleared external to device; service available genunix: ... (4 Replies)
Discussion started by: sunnybee
4 Replies

8. IP Networking

DHCP Server on Vxworks multi interface question

Hi, We currently operate a DHCP Server on Vxworks system. It seems that the server is functioning only over the boot interface. While trying to use it on a different interface the DHCP client messages seems to reach the interface but stay without response. From a... (1 Reply)
Discussion started by: zohara
1 Replies

9. Red Hat

libcurl.so.4 problem

libcurl.so.4: cannot open shared object file: No such file or directory ERROR: Loading network library (net.so) failed! Press Q to shut down the server! http://a1108.hizliresim.com/11/8/17/8183.jpg What must I do ? :wall: (14 Replies)
Discussion started by: Stark0010
14 Replies

10. IP Networking

Port based multi interface routing

Hello, I wanted to setup routing certain traffic (http/s) out via a second (faster) interface, like described in the following docs (may not post urls): linux-ip.net /html/adv-multi-internet.html thegeekstuff.com /2014/08/add-route-ip-command/ I already had this working years ago on... (0 Replies)
Discussion started by: hyphan
0 Replies
SLEEP(9)						   BSD Kernel Developer's Manual						  SLEEP(9)

NAME
msleep, msleep_spin, pause, tsleep, wakeup -- wait for events SYNOPSIS
#include <sys/param.h> #include <sys/systm.h> #include <sys/proc.h> int msleep(void *chan, struct mtx *mtx, int priority, const char *wmesg, int timo); int msleep_spin(void *chan, struct mtx *mtx, const char *wmesg, int timo); void pause(const char *wmesg, int timo); int tsleep(void *chan, int priority, const char *wmesg, int timo); void wakeup(void *chan); void wakeup_one(void *chan); DESCRIPTION
The functions tsleep(), msleep(), msleep_spin(), pause(), wakeup(), and wakeup_one() handle event-based thread blocking. If a thread must wait for an external event, it is put to sleep by tsleep(), msleep(), msleep_spin(), or pause(). Threads may also wait using one of the locking primitive sleep routines mtx_sleep(9), rw_sleep(9), or sx_sleep(9). The parameter chan is an arbitrary address that uniquely identifies the event on which the thread is being put to sleep. All threads sleep- ing on a single chan are woken up later by wakeup(), often called from inside an interrupt routine, to indicate that the resource the thread was blocking on is available now. The parameter priority specifies a new priority for the thread as well as some optional flags. If the new priority is not 0, then the thread will be made runnable with the specified priority when it resumes. PZERO should never be used, as it is for compatibility only. A new pri- ority of 0 means to use the thread's current priority when it is made runnable again. If priority includes the PCATCH flag, signals are checked before and after sleeping, otherwise signals are not checked. If PCATCH is set and a signal needs to be delivered, ERESTART is returned if the current system call should be restarted if possible, and EINTR is returned if the system call should be interrupted by the signal (return EINTR). If PBDRY flag is specified in addition to PCATCH, then the sleeping thread is not stopped while sleeping upon delivery of SIGSTOP or other stop action. Instead, it is waken up, assuming that stop occurs on reaching a stop point when returning to usermode. The flag should be used when sleeping thread owns resources, for instance vnode locks, that should be freed timely. The parameter wmesg is a string describing the sleep condition for tools like ps(1). Due to the limited space of those programs to display arbitrary strings, this message should not be longer than 6 characters. The parameter timo specifies a timeout for the sleep. If timo is not 0, then the thread will sleep for at most timo / hz seconds. If the timeout expires, then the sleep function will return EWOULDBLOCK. Several of the sleep functions including msleep(), msleep_spin(), and the locking primitive sleep routines specify an additional lock parame- ter. The lock will be released before sleeping and reacquired before the sleep routine returns. If priority includes the PDROP flag, then the lock will not be reacquired before returning. The lock is used to ensure that a condition can be checked atomically, and that the cur- rent thread can be suspended without missing a change to the condition, or an associated wakeup. In addition, all of the sleep routines will fully drop the Giant mutex (even if recursed) while the thread is suspended and will reacquire the Giant mutex before the function returns. Note that the Giant mutex may be specified as the lock to drop. In that case, however, the PDROP flag is not allowed. To avoid lost wakeups, either a lock should be used to protect against races, or a timeout should be specified to place an upper bound on the delay due to a lost wakeup. As a result, the tsleep() function should only be invoked with a timeout of 0 when the Giant mutex is held. The msleep() function requires that mtx reference a default, i.e. non-spin, mutex. Its use is deprecated in favor of mtx_sleep(9) which pro- vides identical behavior. The msleep_spin() function requires that mtx reference a spin mutex. The msleep_spin() function does not accept a priority parameter and thus does not support changing the current thread's priority, the PDROP flag, or catching signals via the PCATCH flag. The pause() function is a wrapper around tsleep() that suspends execution of the current thread for the indicated timeout. The thread can not be awakened early by signals or calls to wakeup() or wakeup_one(). The wakeup_one() function makes the first thread in the queue that is sleeping on the parameter chan runnable. This reduces the load when a large number of threads are sleeping on the same address, but only one of them can actually do any useful work when made runnable. Due to the way it works, the wakeup_one() function requires that only related threads sleep on a specific chan address. It is the program- mer's responsibility to choose a unique chan value. The older wakeup() function did not require this, though it was never good practice for threads to share a chan value. When converting from wakeup() to wakeup_one(), pay particular attention to ensure that no other threads wait on the same chan. RETURN VALUES
If the thread is awakened by a call to wakeup() or wakeup_one(), the msleep(), msleep_spin(), tsleep(), and locking primitive sleep functions return 0. Otherwise, a non-zero error code is returned. ERRORS
msleep(), msleep_spin(), tsleep(), and the locking primitive sleep functions will fail if: [EINTR] The PCATCH flag was specified, a signal was caught, and the system call should be interrupted. [ERESTART] The PCATCH flag was specified, a signal was caught, and the system call should be restarted. [EWOULDBLOCK] A non-zero timeout was specified and the timeout expired. SEE ALSO
ps(1), locking(9), malloc(9), mi_switch(9), mtx_sleep(9), rw_sleep(9), sx_sleep(9) HISTORY
The functions sleep() and wakeup() were present in Version 1 AT&T UNIX. They were probably also present in the preceding PDP-7 version of UNIX. They were the basic process synchronization model. The tsleep() function appeared in 4.4BSD and added the parameters wmesg and timo. The sleep() function was removed in FreeBSD 2.2. The wakeup_one() function appeared in FreeBSD 2.2. The msleep() function appeared in FreeBSD 5.0, and the msleep_spin() function appeared in FreeBSD 6.2. The pause() function appeared in FreeBSD 7.0. AUTHORS
This manual page was written by Jorg Wunsch <joerg@FreeBSD.org>. BSD
December 12, 2009 BSD
All times are GMT -4. The time now is 04:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy