Sponsored Content
Operating Systems Solaris Solaris 8 -> Solaris 10 = problem :/ Post 302508498 by Tinkh on Monday 28th of March 2011 10:06:50 AM
Old 03-28-2011
Solaris 8 -> Solaris 10 = problem :/

Hello,

I have a multithreading program (just two threads) which works on Solaris 8. I use pthread library to synchronize threads.
I try to run it on Solaris 10 (on another computer). All sources was re-compiled but behaviour of my program is not the same. The thread 2 is never executed when thread 1 is waiting.

example :
Code:
thread 1 beginning                       
                                             thread2 beginning
process
                                             process
process ...
... pthread_cond_wait(...);
(so thread waits a signal from thread 2)

but the program never come back to thread 2 whereas it works on Solaris 8.Smilie

Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

problem in solaris 8

hi, I have install solaris 8 7/01 in ULTRA 10,but when I type commands such like "admintool" and "swtool",there will be a error messege: warning:Missing charsets in string to fontset conversion arithmetic exception - core dumped I dont know what these mean,can anyone help me?thank... (1 Reply)
Discussion started by: fuqiang1976
1 Replies

2. UNIX for Dummies Questions & Answers

Problem with Solaris 9

I'm trying to install this on my pc at home but the thing is after I get to the option screen that ask where I want to boot solaris from: hard drive cd interface after I choose the cd option, it begins reading from the CD then it asks me if I want the installation to be interactive or... (3 Replies)
Discussion started by: TRUEST
3 Replies

3. Solaris

Solaris 10 Jumpstart Problem

Hi, I build a jumpstart server with a running dhcp server. I already managed to install a x86 client via network. But my sparc clients aren't still working. When booting via network I get the following message: Timeout waiting for ARP/RARP packet I ran "snoop" on the server: client2 ->... (1 Reply)
Discussion started by: Jay_Fisi
1 Replies

4. Solaris

sendmail problem on Solaris 10

Hi All, I am facing problem while sending mail using "mail" & "sendmail" commands from my Solaris 10 system. When I send the mail, it moves it to dead.letter & generates following error messages in /var/log/syslog file; Feb 22 14:20:14 ppip1n sendmail: l1M8oDEE008601:... (10 Replies)
Discussion started by: jumadhiya
10 Replies

5. Solaris

Solaris 10 - X Problem

I can't get a remote X session to display on my Solaris 10 box. I can get it to work if I launch X on my local machine (like /usr/openwin/bin/xclock) so I know X itself is working correctly. The problem is, when I am on a remote host, I set the variable, and run /usr/openwin/bin/xclock, and it... (5 Replies)
Discussion started by: pc9456
5 Replies

6. Solaris

Solaris 10 LU problem

I have a problem with export/home after doing the upgrade. The df -k shows /export and /export/home both being mounted on the same slice. Yes, both are in the vfstab file too. When I reformatted the disk for the upgrade, I added 10gb to the /export partition so that is the one I want to end up... (3 Replies)
Discussion started by: zeekstern
3 Replies

7. Solaris

Solaris Problem

I have a SUnfire V120 solaris 10 machine I have recently added memory to. After installation of the RAM, powering back on, the machine did not come back on the network. Consoled into the machine, the routing table has been wiped out completely and I had to reconfigure the IP address. I got the IP... (12 Replies)
Discussion started by: lnxjenn
12 Replies

8. Solaris

Problem with Solaris 11.1 vm

Hi! I have the following problem: I tried to create a Solaris 11.1 virtual machine in the latest VMware Workstation (10.0.1) and despite my efforts it is impossible to make the Tools running. During the installation I receive the following messages: root@solaris:... (0 Replies)
Discussion started by: apollookc
0 Replies

9. Solaris

T3-2 and Solaris 10 Problem

Hi Guys, I got a unique (and wierd) problem with trying to install Solaris 10 off of a DVD on a T3-2. You boot cdrom, it goes through the questions and then when it comes to ask you if you want to install using nfs or dvd if you pick dvd it comes up with an error - ERROR: The disc you inserted... (8 Replies)
Discussion started by: callmebob
8 Replies

10. Solaris

Solaris 10 problem - need help

I installed Solaris 10 on UltraSparc T5120. The machine shows yellow triagle ! LED. I got endless Warnings on console connection WARNING: /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/device@4/storage@0/disk@0,0 (sd6): Error for Command: read(10) Error Level: Fatal... (9 Replies)
Discussion started by: gping
9 Replies
condition(5)						Standards, Environments, and Macros					      condition(5)

NAME
condition - concepts related to condition variables DESCRIPTION
Occasionally, a thread running within a mutex needs to wait for an event, in which case it blocks or sleeps. When a thread is waiting for another thread to communicate its disposition, it uses a condition variable in conjunction with a mutex. Although a mutex is exclusive and the code it protects is sharable (at certain moments), condition variables enable the synchronization of differing events that share a mutex, but not necessarily data. Several condition variables may be used by threads to signal each other when a task is complete, which then allows the next waiting thread to take ownership of the mutex. A condition variable enables threads to atomically block and test the condition under the protection of a mutual exclusion lock (mutex) until the condition is satisfied. If the condition is false, a thread blocks on a condition variable and atomically releases the mutex that is waiting for the condition to change. If another thread changes the condition, it may wake up waiting threads by signaling the associated condition variable. The waiting threads, upon awakening, reacquire the mutex and re-evaluate the condition. Initialize Condition variables and mutexes should be global. Condition variables that are allocated in writable memory can synchronize threads among processes if they are shared by the cooperating processes (see mmap(2)) and are initialized for this purpose. The scope of a condition variable is either intra-process or inter-process. This is dependent upon whether the argument is passed implic- itly or explicitly to the initialization of that condition variable. A condition variable does not need to be explicitly initialized. A condition variable is initialized with all zeros, by default, and its scope is set to within the calling process. For inter-process syn- chronization, a condition variable must be initialized once, and only once, before use. A condition variable must not be simultaneously initialized by multiple threads or re-initialized while in use by other threads. Condition variables attributes may be set to the default or customized at initialization. POSIX threads even allow the default values to be customized. Establishing these attributes varies depending upon whether POSIX or Solaris threads are used. Similar to the distinctions between POSIX and Solaris thread creation, POSIX condition variables implement the default, intra-process, unless an attribute object is modified for inter-process prior to the initialization of the condition variable. Solaris condition variables also implement as the default, intra-process; however, they set this attribute according to the argument, type, passed to their initialization function. Condition Wait The condition wait interface allows a thread to wait for a condition and atomically release the associated mutex that it needs to hold to check the condition. The thread waits for another thread to make the condition true and that thread's resulting call to signal and wakeup the waiting thread. Condition Signaling A condition signal allows a thread to unblock the next thread waiting on the condition variable, whereas, a condition broadcast allows a thread to unblock all threads waiting on the condition variable. Destroy The condition destroy functions destroy any state, but not the space, associated with the condition variable. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
fork(2), mmap(2), setitimer(2), shmop(2), cond_broadcast(3C), cond_destroy(3C), cond_init(3C), cond_signal(3C), cond_timedwait(3C), cond_wait(3C), pthread_cond_broadcast(3C), pthread_cond_destroy(3C), pthread_cond_init(3C), pthread_cond_signal(3C), pthread_cond_timed- wait(3C), pthread_cond_wait(3C), pthread_condattr_init(3C), signal(3C), attributes(5), mutex(5), standards(5) NOTES
If more than one thread is blocked on a condition variable, the order in which threads are unblocked is determined by the scheduling pol- icy. USYNC_THREAD does not support multiple mapplings to the same logical synch object. If you need to mmap() a synch object to different loca- tions within the same address space, then the synch object should be initialized as a shared object USYNC_PROCESS for Solaris, and PTHREAD_PROCESS_PRIVATE for POSIX. SunOS 5.10 20 Jul 1998 condition(5)
All times are GMT -4. The time now is 01:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy