Kernel version 3.12.30-AM335x-PD15.1.1 by PHYTEC. If I use the /sys/class/gpio way, I can see that the button input pin (gpio103 of AM3359) value changes from 0 to 1. Following the this exercise http://elinux.org/EBC_Exercise_11b_gpio_via_mmap and executing the below command for reading gpio pins usig /dev/me…
Tag: linux
How to abort scp on failure using a flag?
Assuming scp 1 2 3 4 myhost:. is there a way to specify in the scp command to abort when the first failure occurs? scp default behaviour is to continue to the next file and not to stop and of course that can be addressed programmatically however looking for more ‘elegant’ approach if such exists. …
access order of std::atomic bool variable
I’ve a function that accesses(reads and writes to) a std::atomic<bool> variable. I’m trying to understand the order of execution of instructions so as to decide whether atomic will suffice or will I’ve to use mutexes here. The function is given below – I’ve read this page o…
ld undefined reference, despite library found and symbols exported
Been fighting with this on and off for 48 hours now; I’m still getting undefined reference errors when attempting to link a dynamic library with its dependency – despite all exports existing, and the library being found successfully. Scenario: libmemory (C++) – exports functions with extern …
Generating Total Time in Milliseconds in SQL Developer
I need to replicate the linux command “date +%s%3N” in SQL Developer. I have tried the below code sample but it returns with a different value. I have also done extensive searching Google with no luck. The date +%s%3N command returns something like: 1475615656692870653 Whereas the above code sampl…
When is scons “Depends” useful when compiling c/cpp files?
Any c/cpp files can call functions defined in other module, only linking phase resolve them. These c/cpp files don’t depend on each other for compiling sequence. So my question is, is there any case that one c/cpp file should depend on another one, so that we need to specify in SConstruct like: Thanks! …
How to make vim high-light as python when editing scons files?
I’m using vim to edit SConstruct files of scons, I want to make vim high-light as python grammar automatically. How to do that? How to associate file name of ‘SConstruct’ with ‘Python’ in vimrc? Thanks Answer Add this to your vimrc:
How can I make a ksh script terminate itself if any issues?
I have written a few ksh scripts, about 6 scripts. These are written to handle huge data files, something like 207 MB big. while running the script, sometimes it gets stuck and does not end. Human interruption is required. In production environment, I want it to run automatically, and should be able to end au…
When changing the comment of a .c file, scons still re-compile it?
It’s said that scons uses MD5 signature as default decider to dertermine whether a source file needs re-compilation. E.g. I’ve got SConstruct as below: And my o.c is: Run scons and remove the comment line, run scons again. I expect that scons should not compile it again, but actually it’s: I…
linux: ranlib doesn’t seem to add any new information into an archive file?
The man page of ranlib says: DESCRIPTION ranlib generates an index to the contents of an archive and stores it in the archive. The index lists each symbol defined by a member of an archive that is a relocatable object file. Well, I tried to compile an archive file like below: I tried to compare the size of li…