General :: Install Atomic Built-in Function On Gcc3.4
Sep 1, 2010
According to [URL], gcc 4.3 supports atomic built-in function "GCC can now use load-linked, store-conditional and sync instructions to implement atomic built-in functions such as __sync_fetch_and_add" However, I am still using gcc 3.4 on my Redhat EL4. How do I get this built-in function installed?
Dear experts,I have a question about open() function of gcc3.4.6.I write a example:
Code: using namespace std; #include<iostream> #include<fstream> int main() { [Code].....
It can be compiled and ran.The statement file=txt_stream_file is in order to change char* to const char*. But open() function is not work,and out: can not open plots/results.txt The open() function of gcc3.4.6 is:
have two shared variables a,b which are related to each other.When multiple applications share these shared variables, access to them needs to be an atomic operation, otherwise the relation may break. So to ensure mutual exclusion, I'll put their modification under a critical section protected by lock.
Code:
critical_code { P(mutex) a := something b := something V(mutex) }
Lets say my hardware/OS/compiler supports atomic variables. Then I modified my above code as follows.
Code:
code { atomic a := something atomic b := something }
Can this code ensure mutual exclusion, when accessed by multiple applications?
Introduction : We have a C++ application in RHEL 5.4 platform. We are using TCP/IP socket programming as well to send and receive some sort of messages. We are using socket write and read command for this purpose and we are getting some run-time write issues in between. By doing various debugging and strace operations, we came to the conclusion that issue happens in some write attempts as follows.
Detailed Description : In the simplest case, consider I have a server and a client. Server writes some messages using write command and client is supposed to read the same data.Major code snippets in Server side is as follows [It is not feasible to extract the actual files and application codes as a whole, below are just the major commands used in server side]:
I am doing migration from GCC 3.4.3 to GCC 4.1.2.While doing that compilation is success after some errors.But while linking, it throws tons to "undefined reference to" errors.I am using libtool as well but the version is 1.5.10.Whether I need to upgrade libtool too?
the function terminates if no key is pressed for 10 consecutive seconds. I tried using the -t option as suggested in some forums, but my version of showkey doesn't have the option of changing the timeout. The options I get are:
-h --helpdisplay this help text -a --asciidisplay the decimal/octal/hex values of the keys -s --scancodesdisplay only the raw scan-codes -k --keycodesdisplay only the interpreted keycodes (default).
Is it possible to write a script to use this function and still keep the function active until an interrupt is recieved?
I'm only somewhat new to linux but I still don't have a real grasp of it's deep innards and I had a fairly outlandish idea that I'm wondering whether is possible/plausible or not.I want to run a game server on CentOS that has a very high dependency on fast writes-to-disk. Disk writes are pretty much the single bottleneck in this server.First I looked at allowing a high queue of writes to pile up before it flushes them to the disk, but I read that this causes fsync, which is still used commonly, to take a very long time.
I've been thinking about the possibility of running the server on a RAM disk, but I still want changes to be saved to non-volatile storage. Not all at once, but have it actively write the changes to disk. The hope is that this would smooth out the peaks and valleys of write activity and improve overall performance, but I have not seen this idea discussed anywhere.
So my question is, is there any plausible way to continuously copy writes to a RAM disk to a physical drive without slowing down the speed of the writes to the RAM drive below the speed of said RAM? Or is there a better way to obtain this sort of performance, short of investing in expensive equipment?
I need to insure the "writer" to named shared memory (small size, 160 bytes) completes his task such that the many "readers" always get the latest data. The machine is a multi-processor (8 CPU, 24 Gig RAM), non-real time system. The system has multiple processes that are also multi-threaded. Thankfully, there is only 1 "writer" and many "readers". There is no semaphore or mutex locking. "Readers" must not block each other and especially not block the "writer".
By design, it is expected from time to time a "reader" will be in the middle of reading when the "writer" begins to update the data. I want to protect against the case of the "writer" being interrupted and a "reader" completes it's read before the "writer" wakes up and completes it's changes. In this case the "reader" will get corrupt data, some new and some old.
Is there anyway in Linux that can achieve atomic increment/decrement for an integer variable without being interrupted? It means that the thread should not chance for other thread to run until theincrement/decrement is completed.
I have this hdd and another with XP in it but when ever I chnage to UBuntu, the clock goes out of whack and, makes me manually change it whereas in my XP I have an atomic clock installed that I just click on 'Ping' and she's right. I've looked at heaps of downloads for similar on here but, I haven't found a free one other than a trial type that I'm not interested in, that works so, why is Linux so difficult in this regard? I will accept all the help I can get on here because I like the thought of being able to get away from Microsoft.
I wasn't sure if this is the right place to ask or comment on this, but since it's about Apache web server I thought it should work. I finally figured out how to set up and bring up the site using virtual hosts in Apache, though at the moment it's just for my localhost install.
I set them up so I can have a place to play with possible new themes and/or test out the Drupal 7 alpha / beta releases without messing up my current configuration. I decided to look at the error logs for the currently configured site and it had a lot of messages similar to the following:
[Sat Mar 06 09:45:39 2010] [error] [client 127.0.0.1] ModSecurity: Unable to retrieve collection (name "ip", key "127.0.0.1"). Use SecDataDir to define data directory first. [hostname "site.local"] [uri "/"] [unique_id "ZnUHgsCoAAEAABdzR2QAAAAB"]
i have acre M670G and am use red hat 5.3 i need to install Ethernet built in by use 64kb architecture but it doesn't work but it work with 32kb architecture . i need it by use 64kb architecture
I'm having some trouble installing SLES using "live installer" during the install process I get an error installing grub: Error 15: File not found.
I also tried dd to the drive (as I have done many times with opensuse) but I could not boot to the drive. I wanted to use SLES so that I could purchase support in the future if needed. The supportability report showed that all the packages were supported.
I bought a multifunction stylus sx218 Espon model and I can not run the scanner function. I did some research and found a few solutions and very functional. I hope someone solves the problem. My version of openSUSE 11.2.
I am doing some Linux kernel programming for my research project. I need to record the timestamp (by using cpuid and rdtsc) when an interrupt handler (top half) is first invoked. Due to the time critical nature of the problem itself, I have to do the timestamping inside the interrupt handler itself (the first operation when the handler is called). However, I understand that tasks that are not so time critical should be deferred to a tasklet function (bottom half) for processing because other interrupts are disabled in a (top-half) interrupt handler. I am currently out of idea on how I can pass the timestamp information that I have obtained in the interrupt handler to the corresponding tasklet function.
I'm currently using OpenSuse 11.1 web server. This is bad since 11.1 is no longer supported. the reason why I am using it is because Function set_magic_quotes_runtime() was no longer being used. (so I was told)
That being said, is there a way to get Function set_magic_quotes_runtime() to function on the newer versions of OpenSuSE?
I considered puppy Linux, but it's not my taste. I don't like the Looks of the GUI. That's very important to me. If you need the computer make and model, here it is. It is a Gateway 2000 4DX2-66.
My workstation has a built-in speaker that, surprisingly, plays audio very well. I also have external speakers hooked up to the audio out jack which are easier to hear. Unfortunately, when I try to play some audio material, sound comes out of both the external speakers and the built-in speaker on the workstation.
I'd like to disable the speaker inside the machine, and just plug in head-phones to the external speaker so I can listen to training material at work without bothering my office mate. I'm not sure how to do this in Linux (Suse Enterprise Desktop 11). Fiddling around with the Gnome audio tools doesn't list two different audio devices on the machine.
From what I can tell, sound is played through the ALSA system. I looked in my home directory and there is no .asoundrc controlling configuration.
I should also add that I check in the BIOS for a way to disable the built-in speaker, but I could not find such a setting.
How to get a built in fingerprint scanner to work with linux? the device was installed on my laptop when i initially ordered it, i have a dell studio 1735 (i think its 1735) and i would like to use it with my linux. by the way im running mandriva.
I am trying to build a low cost computer, and over the last few days, I was interested in Linux as my OS to use. All I really need for the computer was the internet, word processors, and 3 games: "Wizard101", "Fusion Fall", and "Free Realms". Would Linux run on a built computer with an AMD processor and an on-board GPU? And would Linux run all of my needs/wants for this computer?
I have downloaded the source code of bochs. and I use make install command to install it onto my box. But how could I uninstall it? I run the sudo apt-get remove bochs, but it said I didn't install the bochs...
I am trying to disable the built-in card reader in my MBP (5,3) running Debian testing. I've noticed that powertop lists the card reader as a major contributor of wake up events and would like to disable it as I rarely need to read SD cards.
I am planning on buying a DELL Monitor for my desktop. Now, I would like to have one which has an in-built camera. Also, my operating system is going to be Linux. Will I have any driver related issues for monitor as well as for the in-built camera.
i'm trying to search on the internet for some guidelines to built a HA between 2 linux servers, they are in fact SIP PROXYS. I've been checking on the linux-ha.org and now i'm quite confuse, they mention Pacemaker, Corosync and then glue..