Made a bunch more classes non-copyable
This commit is contained in:
parent
eca23da98b
commit
e8d2d55900
@ -35,6 +35,11 @@ private:
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
// private and undefined to disable copying
|
||||||
|
boxed_region(const boxed_region& rhs);
|
||||||
|
boxed_region& operator=(const boxed_region& rhs);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
boxed_region(rust_env *e, memory_region *br)
|
boxed_region(rust_env *e, memory_region *br)
|
||||||
: env(e)
|
: env(e)
|
||||||
|
@ -35,6 +35,11 @@ public:
|
|||||||
bool is_empty();
|
bool is_empty();
|
||||||
size_t size();
|
size_t size();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// private and undefined to disable copying
|
||||||
|
circular_buffer(const circular_buffer& rhs);
|
||||||
|
circular_buffer& operator=(const circular_buffer& rhs);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
size_t initial_size();
|
size_t initial_size();
|
||||||
void grow();
|
void grow();
|
||||||
|
@ -69,6 +69,11 @@ private:
|
|||||||
void release_alloc(void *mem);
|
void release_alloc(void *mem);
|
||||||
void claim_alloc(void *mem);
|
void claim_alloc(void *mem);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// private and undefined to disable copying
|
||||||
|
memory_region(const memory_region& rhs);
|
||||||
|
memory_region& operator=(const memory_region& rhs);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
memory_region(rust_env *env, bool synchronized);
|
memory_region(rust_env *env, bool synchronized);
|
||||||
memory_region(memory_region *parent);
|
memory_region(memory_region *parent);
|
||||||
|
@ -23,6 +23,11 @@ public:
|
|||||||
private:
|
private:
|
||||||
rust_sched_loop sched_loop;
|
rust_sched_loop sched_loop;
|
||||||
|
|
||||||
|
private:
|
||||||
|
// private and undefined to disable copying
|
||||||
|
rust_sched_launcher(const rust_sched_launcher& rhs);
|
||||||
|
rust_sched_launcher& operator=(const rust_sched_launcher& rhs);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
rust_sched_driver driver;
|
rust_sched_driver driver;
|
||||||
|
|
||||||
|
@ -82,6 +82,11 @@ private:
|
|||||||
|
|
||||||
void pump_loop();
|
void pump_loop();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// private and undefined to disable copying
|
||||||
|
rust_sched_loop(const rust_sched_loop& rhs);
|
||||||
|
rust_sched_loop& operator=(const rust_sched_loop& rhs);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
rust_kernel *kernel;
|
rust_kernel *kernel;
|
||||||
rust_scheduler *sched;
|
rust_scheduler *sched;
|
||||||
|
@ -58,6 +58,11 @@ private:
|
|||||||
// Called when refcount reaches zero
|
// Called when refcount reaches zero
|
||||||
void delete_this();
|
void delete_this();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// private and undefined to disable copying
|
||||||
|
rust_scheduler(const rust_scheduler& rhs);
|
||||||
|
rust_scheduler& operator=(const rust_scheduler& rhs);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
rust_scheduler(rust_kernel *kernel, size_t max_num_threads,
|
rust_scheduler(rust_kernel *kernel, size_t max_num_threads,
|
||||||
rust_sched_id id, bool allow_exit, bool killed,
|
rust_sched_id id, bool allow_exit, bool killed,
|
||||||
|
@ -16,6 +16,12 @@ class rust_signal {
|
|||||||
public:
|
public:
|
||||||
virtual void signal() = 0;
|
virtual void signal() = 0;
|
||||||
virtual ~rust_signal() {}
|
virtual ~rust_signal() {}
|
||||||
|
rust_signal() {}
|
||||||
|
|
||||||
|
private:
|
||||||
|
// private and undefined to disable copying
|
||||||
|
rust_signal(const rust_signal& rhs);
|
||||||
|
rust_signal& operator=(const rust_signal& rhs);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* RUST_SIGNAL_H */
|
#endif /* RUST_SIGNAL_H */
|
||||||
|
@ -305,6 +305,11 @@ private:
|
|||||||
void wakeup_inner(rust_cond *from);
|
void wakeup_inner(rust_cond *from);
|
||||||
bool blocked_on(rust_cond *cond);
|
bool blocked_on(rust_cond *cond);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// private and undefined to disable copying
|
||||||
|
rust_task(const rust_task& rhs);
|
||||||
|
rust_task& operator=(const rust_task& rhs);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Only a pointer to 'name' is kept, so it must live as long as this task.
|
// Only a pointer to 'name' is kept, so it must live as long as this task.
|
||||||
|
Loading…
Reference in New Issue
Block a user