Hide menu

TSEA81 - Computer Engineering and Real-Time Systems

Some resources for C programming

If you are not familiar with C (or C++) the following links might be interesting.

Concurrent programming resources

Here are a number of resources that might be interesting regarding concurrent programming.

Tools for debugging

Writing functional programs can be difficult, especially when dealing with parallel processes. Sometimes using debugging tools is necessary. One such useful tool is GDB (Gnu DeBugger). Have a look at The GNU debugger project, the complete manual for all your debugging needs. GDB also has a manual page in Linux, invoked by man gdb.

Another useful tool when dealing with concurrent programming is Valgrind. It may be used to find certain race conditions. Se the Valgrind user manual. Valgrind also has a manual page in Linux, invoked by man valgrind.

Using Gitlab for version control

With gitlab you can keep versions of your labs and project source code, and simplify the process of moving data between computers.

Sign in to gitlab using your Liu id. Create a new project, e.g. "TSEA81_lab1" according to the instructions there.

Give others access to your repository

You can give others access to your Gitlab repository under "Settings / Members" for the project. Typically their role in the project would be either Developer (being able to commit/push changes to the code in the project) or Maintainer (developer and also being able to change settings for the project in Gitlab).

Skip using passwords

To skip the hassle with passwords, you can use SSH keys. This means taking your public SSH key (found in ~/.ssh/id_rsa.pub) and paste it into the User Settings of Gitlab (found in your profile under "Settings / SSH Keys").

If you don't have a public SSH key you need to generate one, using these instructions.

Typically you will need one public SSH key from each system you wish to work from, that is one public key from IDA, one public key from Muxen, one public key from Thinlinc (and so on) and paste them separately into the configuration of Gitlab.

Initial clone project from gitlab

Cloning (checking out) a project from gitlab for the first time:


git clone git@gitlab.liu.se:liu_id/project_name

Add file to Gitlab repository

Add a new file to the Gitlab repository:


git add filename
git commit -m "commit message"
git push -u origin master

Update local working copy

Update local working copy to the latest commit:


cd working_folder
git pull

Add, commit and push

Use the following commands to push a change to gitlab:


git add changed_file
git commit -m "commit message"
git push

Page responsible: Kent Palmkvist
Last updated: 2019-11-20