// Performs a find successor request to a random id.
private void randomLookup() {
- int id = 1337;
- //Msg.info("Making a lookup request for id " + id);
- findSuccessor(id);
+ int dest = 1337;
+ //Msg.info("Making a lookup request for id " + dest);
+ findSuccessor(dest);
}
/**
/* Returns if the destination has been found */
public boolean destinationFound() {
- if (nodes.size() < 1) {
+ if (nodes.isEmpty()) {
return false;
}
Contact tail = nodes.get(0);
void update_pieces_count_from_bitfield(peer_t peer, unsigned int bitfield)
{
for (int i = 0; i < FILE_PIECES; i++) {
- if ((bitfield & (1U << i))) {
+ if (bitfield & (1U << i)) {
peer->pieces_count[i]++;
}
}
friend ConditionVariable;
friend simgrid::simix::MutexImpl;
simgrid::simix::MutexImpl* mutex_;
- Mutex(simgrid::simix::MutexImpl * mutex) : mutex_(mutex) {}
+ explicit Mutex(simgrid::simix::MutexImpl * mutex) : mutex_(mutex) {}
/* refcounting of the intrusive_ptr is delegated to the implementation object */
friend void intrusive_ptr_add_ref(Mutex* mutex)
/* Process creation/destruction callbacks */
typedef void (*void_pfn_smxprocess_t) (smx_actor_t);
-/* for auto-restart function */
-typedef void (*void_pfn_sghost_t) (sg_host_t);
extern int smx_context_stack_size;
extern int smx_context_stack_size_was_set;
#include <stdarg.h>
#include <xbt/dynar.h>
-SG_BEGIN_DECL()
-
/** @addtogroup XBT_config
* @brief Changing the configuration of SimGrid components (grounding feature)
*
typedef void* xbt_cfg_t;
#endif
+SG_BEGIN_DECL()
+
XBT_PUBLIC(void) xbt_cfg_set_parse(const char *options);
/* Set the value of the cell \a name in \a cfg with the provided value.*/