Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the parallel execution for the bittorrent example.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 12 Feb 2013 13:14:50 +0000 (14:14 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 12 Feb 2013 13:47:38 +0000 (14:47 +0100)
commit2b9e15c1a85e32f98027ba1f1ce99bed29490f49
treed6ca0ac40f409b3baf7fb550cf514d9bbe254f74
parent30add308fd48d36226f5bd4ae345cceb008f12f4
Fix the parallel execution for the bittorrent example.

The problem was that RngStream creation is not thread safe.  Furthermore,
each created RngStream is dependent of the previously created RngStreams.

The problem is circumvented by creating the RngStreams before the launch
of the application.  Each host has its own stream, that can be retrieved
through MSG_host_get_data().
examples/msg/bittorrent/bittorrent.c
examples/msg/bittorrent/bittorrent.h
examples/msg/bittorrent/bittorrent.tesh
examples/msg/bittorrent/peer.c
examples/msg/bittorrent/tracker.c