Hint

Scroll down for latest articles and updates...

Archives

Tag Cloud

Category Cloud

Posted on Mar 18, 2009

Did you know…

that a quantum leap is the smallest possible step from a high energetic potential to a low energetic potential?

Posted on Mar 18, 2009

Finite State Machine Matrix-Style-C-Implementation (Function Pointers Addon)

I posted my solution for Finite State Machines in C using Matrix. Jean-Marc (f1hdi.org) commented to that entry:

I would love to have the state event matrix not only returning a ‘next state’ and action to do BUT directly calling ‘actions’ functions. A long time ago , when I was at school, I wrote such ptr function call but can’t reproduce it now.
Basically , in your routine below, I would love to replace the ‘return’ by a call to a function which you would have its pointer in the matrix.
Any idea ?

The simple answer to Jean-Marc’s questions is “Yes” and I’m really sorry that I hadn’t got the time to answer sooner. The basic idea of using function pointers is the right choice to find a solution for this task.

Continue Reading

Posted on Jan 17, 2009

Fedora Yellow Update Manager (yum) Database-Errors (quick fix)

I had a strange error within my last yum update command. I got these error

rpmdb: Thread/process xxxxx/yyyyyyyyyy failed:
Thread died in Berkeley DB library

and yum stuck in the mid of the update process. This might have been due to an compromised ext-filesystem, as my laptop didn’t shutdown properly and maybe the journal got cluttered.

However, there is an easy way to get thinks back to a working state (at least for me), which might help others:

rm -f /var/lib/rpm/__db*
rpm –rebuilddb

yum clean all
yum check-update

The first two lines remove the old database entries and rebuild the Berkely database. Make sure, that there are no other yum-services running while rebuilding the database (at least this is, what has been said in the bug-reports). The second two lines clean the yum cache and update the package lists. Yum should run without database errors now.

The error has multiple hits (though it’s obviously not a bug) on the Fedora bug-tracker (bug#471411, bug#468437, bug#462314, bug#479818 and bug#45303)

Posted on Sep 8, 2008

Finite State Machine Matrix-Style C Implementation

There are several implementations of finite state machines avaible, the only drawback most of them are suffering is that they are moore machines (under certain circumstances this means a large number of states) and changing the machines behaviour will change the whole code structure (this means low flexibility and the reprogramming may be a huge cause of defects).

I’d like to present an Implementation of a FSM, i’ve found during my student research project that is a mealy machine and does not require a reprogramming of the underlying structure.

Continue Reading

Latest Pictures

Latest Tracks

Latest Tweets